DEV Community

Docker CLI commands and what you can do with them

twain taylor on January 10, 2018

Docker has changed the way applications are developed. In a short span of time since its launch in 2014 Docker has found a place in almost every de...
Collapse
 
dmfay profile image
Dian Fay

Another very useful Docker command which lets you get a shell in a running container to see what's going on in the thing:

docker exec -ti containername /bin/bash (or /bin/sh if it doesn't have Bash installed)

Collapse
 
msoedov profile image
Alex Miasoiedov • Edited

You don't need to use full path to /bin/bash

docker exec -ti containername bash

As long as executable in the $PATH you don't have to specify a full path. /bin suppose to be in the PATH in all commonly used linux distro

Collapse
 
jorjtyron profile image
Costin Giorgian

The example of docker commit is a docker rmi command. Please change!

Collapse
 
twaintaylor profile image
twain taylor

Thanks! I've fixed it.

Collapse
 
david_j_eddy profile image
David J Eddy

Excellent cheat sheet for the beginner! Passed this along to our newer engineers.