Skip to content

Instantly share code, notes, and snippets.

@GrzegorzBandur
Last active February 2, 2020 10:12
Show Gist options
  • Save GrzegorzBandur/b9cc59893c1336c0fe46df05b5b4f722 to your computer and use it in GitHub Desktop.
Save GrzegorzBandur/b9cc59893c1336c0fe46df05b5b4f722 to your computer and use it in GitHub Desktop.
Useful docker commands

Build && run docker enviroment

docker-compose up --build

Build docker enviroment

docker-compose build

Stops containers and removes containers, networks, volumes, and images created by up.

docker-compose down

Stops containers all containers.

docker container kill $(docker ps -a -q)

Removes containers all containers.

docker container rm $(docker ps -a -q)

Enter shell in container

docker exec -it name_of_container sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment