Docker Commands

From Secure Computing Wiki
Jump to navigation Jump to search


This page is intended to simply be a searchable list of Docker commands. There is of course the Official docker commands documentation. This is mainly for me to document what I've been learning.

see Docker for more info

TODO: sort the cmds and make page pretty


docker run imageName [parameters to pass to container]

Creates image and runs from container.


docker run hello-world
docker run busybox ls 
docker run busybox echo yeah, I can fly
docker run busybox ping

docker ps [--all]

Shows all running containers:

docker ps

Shows all containers ever run on system (that have not been pruned off file system):

docker ps --all

docker create

creates the docker container from image but does not run/start it

docker start [name or id of container] [-a]

starts running docker container already created previously

putting the -a will display output of container, by default no output will show in command line

note: you cannot modify the parameters you passed to the container when it was created at this point


docker start magical_curie
docker start cb7018d7799d -a

docker system prune

removes all stopped containers