Results for “options”
Small, practical examples. Search by task or narrow things down below.
Load service variables from an env file
Docker / Compose: env_file supplies runtime environment values.
Docker / Compose✓ Tested
Mount a local input directory with long syntax
Docker / Compose: Long mount syntax makes the bind type and read-only intent explicit.
Docker / Compose✓ Tested
Override an env-file value explicitly
Docker / Compose: The environment section takes precedence over env_file.
Docker / Compose✓ Tested
Override the image entrypoint in Compose
Docker / Compose: entrypoint and command combine as executable and arguments.
Docker / Compose✓ Tested
Parse a short option with getopts
Read a named option and handle invalid flags explicitly.
getopts✓ Tested
Pass dollar expressions through Compose
Docker / Compose: Double dollar signs defer expansion to the container shell.
Docker / Compose✓ Tested
Protect a Compose service’s root filesystem
Docker / Compose: read_only rejects writes to the image filesystem.
Docker / Compose✓ Tested
Read a secret from a mounted file
Docker / Compose: Compose secrets make a file available under /run/secrets.
Docker / Compose✓ Tested
Run a Compose service as a non-root user
Docker / Compose: user overrides the image’s default identity.
Docker / Compose✓ Tested
Set a Compose service’s working directory
Docker / Compose: working_dir changes where the container command starts.
Docker / Compose✓ Tested
Set a service’s open-file limit
Docker / Compose: The ulimits mapping defines soft and hard resource limits.
Docker / Compose✓ Tested
Set no-new-privileges in Compose
Docker / Compose: security_opt configures the process privilege restriction.
Docker / Compose✓ Tested