FIND YOUR NEXT FEW LINES
Results for “compose”
Small, practical examples. Search by task or narrow things down below.
129 snippets foundClear filters
Read output from a completed container
Retrieve the stdout captured by Docker.
logs✓ Tested
Run a command in a running container
Execute an additional process inside an existing container.
exec✓ Tested
Run a one-off container
Run a command and remove its stopped container automatically.
run✓ Tested
Run an image as a non-root user
Choose an unprivileged numeric identity for the default process.
Dockerfile✓ Tested
Run with a read-only root filesystem
Add a temporary writable location while protecting the image filesystem.
read-only✓ Tested
Set a working directory
Choose the default directory for later instructions and the running process.
Dockerfile✓ Tested
Set an image’s default command
Use JSON array syntax for a predictable command.
Dockerfile✓ Tested
Set and inspect a memory limit
Apply a per-container limit when creating a container.
memory✓ Tested
Share data through a named volume
Keep a file across two short-lived containers.
volume✓ Tested