Skip to main content

docker-compose

Browse all articles, tutorials, and guides about docker-compose

14posts

Posts

Docker
|7 min read

How to Get docker-compose to Always Re-create Containers from Fresh Images

Want to make sure docker-compose always uses the latest image and re-creates containers? Learn the right flags, workflow, and best practices to avoid stale containers in development and CI.

Docker
|9 min read

Connecting to PostgreSQL in a Docker Container from Outside

Expose PostgreSQL safely and connect from your host or another machine using Docker and Docker Compose. Covers port publishing, listen addresses, pg_hba.conf basics, and common troubleshooting.

Docker
|6 min read

What Is the Difference Between 'docker compose' and 'docker-compose'?

Confused about 'docker compose' vs 'docker-compose'? Learn the key differences, why the new command exists, and which one you should use for your projects.

Docker
|7 min read

How Can I Use Environment Variables in docker-compose?

Learn the best ways to manage and use environment variables in docker-compose files, including .env files, variable substitution, and secure practices for real-world projects.

Docker
|6 min read

How to Use docker-compose up for Only Certain Containers

Want to start just a few services from your docker-compose file? Learn how to use docker-compose up to run only specific containers, with practical examples and tips for multi-service projects.

Docker
|9 min read

How to Add a Volume to an Existing Docker Container

You cannot change mounts on a running container, but you can safely recreate it with the desired volume. This guide shows exact commands for Docker CLI and Docker Compose, plus ways to migrate or seed data.

Docker
|7 min read

What’s the Difference Between Docker Compose vs. Dockerfile?

Understand the key differences between Docker Compose and Dockerfile, and learn when to use each in your containerized workflows.

Docker
|8 min read

Docker Compose: Wait for Container X Before Starting Y

Configure Docker Compose so a service waits for another container to be ready, using healthchecks and depends_on conditions with a working example.

Docker
|6 min read

Docker Compose: Understanding Ports vs Expose

Learn the key differences between ports and expose in Docker Compose, when to use each one, and how they affect container networking and security in your applications.

Docker
|8 min read

Communication Between Multiple Docker-Compose Projects

Learn how to enable communication between multiple Docker-Compose projects using shared networks and environment configurations.

Docker
|7 min read

How to Execute Multiple Commands in Docker Compose

Learn different techniques for running multiple commands in Docker Compose services, from simple command chaining to advanced multi-stage initialization scripts.

Docker
|7 min read

How to Rebuild a Docker Container in docker-compose.yml?

Learn how to rebuild Docker containers defined in a docker-compose.yml file, including tips for managing changes and dependencies.

Docker
|5 min read

How to Restart a Single Container with Docker Compose

Learn how to restart a specific container in a Docker Compose setup without affecting other services.

Docker
|6 min read

Interactive Shell Using Docker Compose

Learn how to start an interactive shell in a Docker Compose service for debugging and development.