How To List and Attach to Docker Containers
How To Install Docker on CentOS 6
How To Install Docker on CentOS 7
How To Install Docker on Ubuntu 14.04 LTS
How To Install Docker on Fedora 20
How To Install Docker on Fedora 21
II. How To List and Attach to Docker Containers
III. How to Commit Changes and Create Docker Images
IV. How to View Logs for a Docker Container
- As of June 2014 Docker has officially released v1.0.0.
- These instructions are intended for listing and attaching to Docker containers.
- I’ll be working from a Liquid Web Core Managed CentOS 6.6 server (or CentOS 7, Ubuntu 14.04 LTS, Fedora 20, Fedora 21), and I’ll be logged in as root.
- I have one Docker container running.
First, we’ll list which containers we have running:
docker ps
Your result should look similar to this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9c09acd48a25 fedora:20 /bin/bash 55 minutes ago Up 53 minutes furious_heisenberg
To list all local containers use -a option:
docker ps -a
It is some times handy to view the latest created container, including non-running containers. Simply use the -l option:
docker ps -l
To attach to a specific container you must have the Container ID. In this case, we’ll attach to the container with the ID 9c09acd48a25 :
docker attach 9c09acd48a25
Continue through this series of tutorials to configuring your container, and committing the changes to create a Docker image.
Related Articles:
- What is CentOS? Everything You Need to Know
- Check Apache Status with systemctl status and apachectl status Commands
- How to Find the Server Name Indication (SNI) Supporting Details
- How to Install Pip on CentOS 7
- Get Kernel Version for Linux: A Guide
- What Is a Time Series Database? How It Works & Use Cases

About the Author: J. Mays
As a previous contributor, JMays shares his insight with our Knowledge Base center. In our Knowledge Base, you'll be able to find how-to articles on Ubuntu, CentOS, Fedora and much more!
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.
Latest Articles
ChatGPT Integration — How to Create a Plugin for ChatGPT
Read ArticleWhat is CentOS? Everything You Need to Know
Read ArticleWhat is CentOS? Everything You Need to Know
Read ArticleRedis as Cache: How It Works and Why You Should Use It
Read ArticleRefer-a-Friend Program for Website Hosting: Get $100 for Each Friend!
Read Article