Docker Commands

#see running containers
docker ps
#kill a running container (use CONTAINER ID)
docker kill d4930c9b409a
#list all images
docker images -a
#remove an image (use IMAGE ID)
docker rmi -f 3dcfe809147d

#run without connecting into bashdocker command

#start the container in an interactive mode -i -t. In our case, we will override the entrypoint command so we are presented with a bash terminal. Now we can execute whatever commands we want, but exiting the container will stop it

docker run -i -t –entrypoint=”bash” imagename

Advertisements