docker-compose command example
Example 1: docker compose run
# One single docker-compose.yml file
docker-compose up --build -d --remove-orphans
# Specify docker-compose.yml file to run
docker-compose -f docker-compose.yml up --build -d --remove-orphans
Example 2: docker compose command
docker-compose start
docker-compose stop
Example 3: docker compose command
docker-compose pause
docker-compose unpause
Example 4: docker compose entrypoint
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s