giovictor
11/18/2019 - 9:49 AM

Docker Commands

Docker Commands

docker build -t "[TAG_NAME]" . - build image from Dockerfile

docker-compose up -d - start the containers in the background and leaves them running (add --build to rebuild containers)

docker ps - list all running containers (add -a to include exited containers)

docker exec -it [CONTAINER ID] bash - access a running container

docker compose down -a

docker system prune -a

docker volume prune

docker image prune -a