Skip to content
Learn with RV – Tech Blog
Learn with RV – Tech Blog

#testautomation #qa #programming #linux #devops

  • Home
  • Who am I?
  • 1-on-1 Mentoring
  • Test Automation Incubator
  • 24 Testimonials
  • YouTube
  • LinkedIn
  • Contact
Learn with RV – Tech Blog

#testautomation #qa #programming #linux #devops

docker-ps-thumbnail
September 4, 2026September 4, 2026

Customizing docker ps Output with –format

The default docker ps output can contain more information than you actually need.

With the --format option, you can choose exactly which columns to display.

For example:

docker ps --format "table {{.Ports}}\t{{.Status}}\t{{.Names}}"

This displays only the Ports, Status, and Names columns, making the output much easier to scan.

Note: It can be configured with other columns that are relevant to you (e.g. ID)

Example: docker ps

docker-ps
Example: docker ps --format "table {{.Ports}}\t{{.Status}}\t{{.Names}}"

How to turn this into command into a handy CLI alias (e.g. dps)

1. Add the alias to your shell configuration

For Bash, open either ~/.bashrc or ~/.bash_profile:

nano ~/.bashrc

Then add:

alias dps='docker ps --format "table {{.Ports}}\t{{.Status}}\t{{.Names}}"'

2. Reload the configuration

Run:

source ~/.bashrc

If you added the alias to .bash_profile, run:

source ~/.bash_profile
3. Use the alias

From now on, simply run:

dps

and you’ll get the customized docker ps output without having to type the full command every time.

 

Tip: You can customize the format further by using other Docker placeholders such as {{.ID}}, {{.Image}}, {{.Command}}, {{.CreatedAt}}, and {{.RunningFor}}.

Enjoyed this article?
I share more practical automation tips on YouTube and LinkedIn.

Need structured guidance instead of learning alone?
I offer 1-on-1 mentoring – learn more → HERE

Or email me at iamqarv [at] gmail [dot] com

Post Views: 57

Related

Share this article:
Uncategorized

Post navigation

Previous post
Next post

Recent Posts

  • Integrating OpenCode with the Grafana k6 MCP Server
  • Customizing docker ps Output with –format
  • Using npm –prefix to Run Scripts from a Nested package.json
  • Unit Testing in JavaScript: Getting started with Vitest
  • Fail Fast in Playwright with maxFailures

Recent Comments

  1. Paul on Web Accessibility: A step-by-step guide to Testing with pa11y
  2. Automated Tests for website Accessibility with Axe and TestCafe - Learn with RV - Tech Blog on How to generate E2E TestCafe Framework in seconds
  3. RV on Exploring Faker.js: A Powerful Tool for Generating Realistic Random Test Data
  4. Adrian Maciuc on Exploring Faker.js: A Powerful Tool for Generating Realistic Random Test Data
  5. Nick on Cypress vs Playwright vs Testcafe – which framework is faster?

Archives

  • October 2026
  • September 2026
  • July 2026
  • June 2026
  • May 2026
  • April 2026
  • March 2026
  • February 2026
  • November 2025
  • October 2025
  • September 2025
  • August 2025
  • July 2025
  • June 2025
  • March 2025
  • February 2025
  • January 2025
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023

Categories

  • AI
  • k6
  • Linux
  • Programming
  • QA
  • Tools
  • Uncategorized
©2026 Learn with RV – Tech Blog | WordPress Theme by SuperbThemes