DZone
Cloud Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Cloud Zone > List All Containers on Docker

List All Containers on Docker

Here's a quick and easy way to draw up a list of all your containers on Docker.

Paul Underwood user avatar by
Paul Underwood
·
Jun. 23, 16 · Cloud Zone · Tutorial
Like (1)
Save
Tweet
3.23K Views

Join the DZone community and get the full member experience.

Join For Free

Docker is a piece of software that allows you to run a complete filesystem in its own environment like a virtual machine by using containers to wrap up the environment. It will contain all of this together to run code, runtime, system tools, and system libraries, which is everything you need to run your own server.

It is different in the architecture of virtual machines as all of the containers share the same kernel as the other containers but all other dependencies can run in isolation.

This uses a config file to add all the dependencies you need on your server for your application to run correctly, for example, if your application needs a certain version of PHP to run, then creating a Docker environment will allow you to easily share the same environment with all developers on the project. If all developers are creating the application on the exact same environment as the live system will be on, it will make testing a lot easier allowing deployment to happen much faster and easier.

Learn More About Using Docker

List All Containers

The below command will show all the current containers you have on Docker.

docker ps


To see all the current containers including those that aren't running you need to use the -l flag.

docker ps -l


Once you have a list of all the containers you can attach to a certain container by using the container ID you get back from the list.

docker attach {CONTAINERID}
Docker (software)

Published at DZone with permission of Paul Underwood, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Are Foreign Keys Unscalable?
  • Complete Guide to TestOps
  • What Is Edge Compute? It’s Kind of Like Knitting Dog Hats
  • Kafka vs. JMS: Which One Should You Be Using?

Comments

Cloud Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo