Docker Compose
Run docker in background Stop the container List volumes inspect List running docker To access the container Build images Update a specific service only Bonus Tip (Clean Up):…
On this page
- Run docker in background
- Stop the container
- List volumes
- inspect
- List running docker
- To access the container
- Build images
- Update a specific service only
- Bonus Tip (Clean Up): Repeatedly rebuilding images will leave behind old, unnamed images known as "dangling images". You can reclaim disk space at any time by running:
Run docker in background
bash
docker compose up -d --buildbash
docker compose up -dbash
docker volume lsStop the container
bash
docker compose downList volumes
bash
docker compose volumes
DRIVER VOLUME NAME
local docker-compose-file_postgres_data
inspect
bash
docker inspect docker-compose-file_postgres_dataList running docker
bash
docker compose ps -aTo access the container
bash
docker compose exec servicename bashBuild images
bash
docker compose down
docker compose up -d --buildUpdate a specific service only
bash
docker compose up -d --build <service_name>Bonus Tip (Clean Up): Repeatedly rebuilding images will leave behind old, unnamed images known as "dangling images". You can reclaim disk space at any time by running:
bash
docker image prune -fdocker/docker-compose.md
Related articles
- DockerDockerList docker images Start docker image List docker running process Remove docker container id Delete docker images To remove the container To remove image To list image
- DockerDocker Hub2.Build the Production Image:Target Dockerfile.prod explicitly.Build your image using your production Dockerfile (Dockerfile.prod). Give it a primary tag corresponding to your…
- DockerNo spacke left to move Docker's data directory:Then create /etc/docker/daemon.json: Restart docker
- DockerError response from daemon: conflict: unable to remove repository reference "postgres:15" (must force) - container d8c593fad145 is using its referenced image 9a18aed4ecddCheck whether it's running: If you no longer need it, remove it: If it's running, stop it first: Then remove the image: Option 2: Force remove the image Option 3: Find all…