Results for “command”
Small, practical examples. Search by task or narrow things down below.
Use a build argument while creating an image
Docker / Compose: ARG supplies a build-time value that is not automatically a runtime environment variable.
Docker / Compose✓ Tested
Validate the number of positional arguments
Bash Scripts: Use the argument count to enforce a simple command-line contract.
Bash Scripts✓ Tested
Verify a read-only volume rejects writes
Docker / Compose: A failed write confirms the mount’s read-only behavior.
Docker / Compose✓ Tested
Verify that a one-off container was removed
Docker / Compose: An automatically removed container no longer appears in an exact-name listing.
Docker / Compose✓ Tested
Wait for a container to exit
Docker / Compose: wait blocks until the container stops and prints its exit code.
Docker / Compose✓ Tested
Wait for an actual container health check
Docker / Compose: Health reports readiness independently from process startup.
Docker / Compose✓ Tested
Wait for an initialization job
Start a service only after its dependency completes successfully.
Compose✓ Tested
Write a literal multiline block
Bash Scripts: Quoting the heredoc delimiter disables parameter and command expansion inside it.
Bash Scripts✓ Tested