FIND YOUR NEXT FEW LINES
Results for “Compose service options”
Small, practical examples. Search by task or narrow things down below.
151 snippets foundClear filters
Run a task on an executor and close it
Java: Java 21 ExecutorService supports try-with-resources to shut down after submitted work.
Java✓ 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