GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Hacker-Scripts/docker at master · PowerShellLibrary/Hacker-Scripts

Expand file tree

/

docker

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

docker

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Copy-FilesToContainer.ps1
Copy-FilesToContainer.ps1
 
 
README.md
README.md
 
 

README.md

Outline

Docker Compose quick reference

Run these commands from the directory containing compose.yaml or docker-compose.yml. Replace <service> with a service name from the Compose file.

Start services

# Start services in the foreground. Press Ctrl+C to stop them.
docker compose up

# Start services in the background.
docker compose up -d

# Rebuild images before starting services.
docker compose up --build

# Remove containers from older Compose configurations if they are reported as
# orphans.
docker compose up --remove-orphans

Inspect services

# List services and their current state.
docker compose ps

# Follow logs for all services.
docker compose logs -f

# Follow logs for one service.
docker compose logs -f <service>

Stop and restart

# Stop containers without removing them.
docker compose stop

# Start stopped containers.
docker compose start

# Restart containers.
docker compose restart

Run one-off commands

# Open a shell in a running service.
docker compose exec <service> sh

# Run a command in a temporary container and remove it afterwards.
docker compose run --rm <service> <command>

exec requires a running container. run --rm creates a temporary container for the command and removes it when the command finishes.

Remove resources

# Stop and remove containers and the Compose network.
docker compose down

# Also remove named volumes declared by the Compose file.
docker compose down --volumes

# Also remove images used by the services.
docker compose down --rmi local

Use down --volumes carefully: it deletes data stored in named volumes.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.