in Docker

List All Containers On Docker

DockerLogo Docker is a piece of software that allows you to run a complete filesystem in it's own environment like a virtual machine buy by using containers to wrap up the environment. It will contain all 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}

Subscribe To The Weekly Newsletter

Get weekly updates to your email