FIND YOUR NEXT FEW LINES

Results for “Container lifecycle”

Small, practical examples. Search by task or narrow things down below.

184 snippets foundClear filters
Docker / ComposeCompose service options

Protect a Compose service’s root filesystem

Docker / Compose: read_only rejects writes to the image filesystem.

Docker / Compose✓ Tested
Docker / ComposeBuild images

Provide a default environment value

Set a runtime default that can be overridden at startup.

Dockerfile✓ Tested
Docker / ComposeCompose applications

Put an optional service behind a profile

Keep a utility service separate from a normal Compose startup.

Compose✓ Tested
Docker / ComposeGetting Started

Read a completed example’s output

Docker / Compose: Read a completed example’s output using a locally available Ubuntu image.

Docker / Compose✓ Tested
Docker / ComposeCompose service options

Read a secret from a mounted file

Docker / Compose: Compose secrets make a file available under /run/secrets.

Docker / Compose✓ Tested
Docker / ComposeImage management

Read an image’s default command

Docker / Compose: Config.Cmd contains the command arguments stored in the image.

Docker / Compose✓ Tested
Docker / ComposeNetworks & volume metadata

Remove one network attachment

Docker / Compose: network disconnect removes the specified attachment while retaining the container.

Docker / Compose✓ Tested
Docker / ComposeImage management

Remove one tag while retaining another reference

Docker / Compose: Removing a tag does not delete an image still referenced by another tag.

Docker / Compose✓ Tested
Docker / ComposeImage management

Require a locally available image

Docker / Compose: The never pull policy fails for missing images instead of attempting a download.

Docker / Compose✓ Tested
Docker / ComposeNetworks & volume metadata

Resolve a peer’s name on a user-defined network

Docker / Compose: The embedded DNS service resolves names on user-defined bridges.

Docker / Compose✓ Tested
Docker / ComposeCompose service options

Run a Compose service as a non-root user

Docker / Compose: user overrides the image’s default identity.

Docker / Compose✓ Tested
Docker / ComposeGetting Started

Run a Compose service as a numeric user

Docker / Compose: Run a Compose service as a numeric user in a small Compose file.

Docker / Compose✓ Tested