FIND YOUR NEXT FEW LINES

Results for “environment”

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

138 snippets foundClear filters
Bash ScriptsProcesses & environment

Export a value to child processes

Bash Scripts: Only exported shell variables are inherited through the environment.

Bash Scripts✓ Tested
Bash ScriptsProcesses & environment

Handle a nonzero background-job exit

Bash Scripts: Wait reports a child’s exit code; put it in a conditional when failure is expected.

Bash Scripts✓ Tested
Bash ScriptsProcesses & environment

Keep loop state by avoiding a pipeline subshell

Bash Scripts: Redirect input into a while loop so updates to a counter remain in the current shell.

Bash Scripts✓ Tested
Docker / ComposeGetting Started

Pass a named configuration value

Docker / Compose: Pass a named configuration value using a locally available Ubuntu image.

Docker / Compose✓ Tested
Bash ScriptsProcesses & environment

Preserve a failure status while an EXIT trap runs

Bash Scripts: Capture the status immediately on entry to the trap before running cleanup commands.

Bash Scripts✓ Tested
Bash ScriptsProcesses & environment

Stop a child process created by the script

Bash Scripts: Send a signal only to the captured PID of the script’s own child and wait for it to exit.

Bash Scripts✓ Tested
Bash ScriptsProcesses & environment

Wait for a background job before reading its output

Bash Scripts: Save the job PID and wait explicitly before consuming files it produces.

Bash Scripts✓ 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 / ComposeStorage & isolation

Attach containers to a user-defined network

Create a dedicated network for a small group of containers.

network✓ Tested