FIND YOUR NEXT FEW LINES

Results for “Compose”

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

129 snippets foundClear filters
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
Docker / ComposeCompose service options

Set a Compose service’s working directory

Docker / Compose: working_dir changes where the container command starts.

Docker / Compose✓ Tested
Docker / ComposeCompose service options

Set no-new-privileges in Compose

Docker / Compose: security_opt configures the process privilege restriction.

Docker / Compose✓ Tested
Docker / ComposeCompose service options

Supply a default for an unset Compose variable

Docker / Compose: The default interpolation form supplies a value when the variable is absent or empty.

Docker / Compose✓ Tested
Docker / ComposeCompose service options

Wait for a healthy Compose dependency

Docker / Compose: The service_healthy dependency condition waits for the dependency’s health command to succeed.

Docker / Compose✓ Tested
Docker / ComposeCompose service options

Add a fixed hostname mapping

Docker / Compose: extra_hosts adds an entry to the container’s hosts file.

Docker / Compose✓ Tested
Docker / ComposeNetworks & volume metadata

Assign a network-scoped alias

Docker / Compose: An alias gives an endpoint an additional name on that network.

Docker / Compose✓ Tested
Docker / ComposeGetting Started

Attach a descriptive label to a container

Docker / Compose: Attach a descriptive label to a container using a locally available Ubuntu image.

Docker / Compose✓ Tested
Docker / ComposeNetworks & volume metadata

Attach an existing container to another network

Docker / Compose: network connect adds an attachment without recreating the container.

Docker / Compose✓ Tested
Docker / ComposeGetting Started

Build an image with a default command

Docker / Compose: Build an image with a default command with a complete introductory Dockerfile.

Docker / Compose✓ Tested
Docker / ComposeImage management

Check that an image has layer history

Docker / Compose: history shows the instructions associated with image layers.

Docker / Compose✓ Tested
Docker / ComposeCompose service options

Choose a service’s internal hostname

Docker / Compose: hostname controls the name reported inside the container.

Docker / Compose✓ Tested