FIND YOUR NEXT FEW LINES

Results for “build context”

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

82 snippets foundClear filters
PythonFiles & paths

Read a text file

Open a UTF-8 text file and read its contents. A context manager closes the file automatically, even if reading fails.

file✓ Tested
PythonNumbers & calculations

Round decimal amounts explicitly

Python: Build Decimal values from strings and choose a rounding rule explicitly.

Python✓ Tested
Docker / ComposeBuild images

Run an image as a non-root user

Choose an unprivileged numeric identity for the default process.

Dockerfile✓ Tested
Docker / ComposeGetting Started

Separate an executable from default arguments

Docker / Compose: Separate an executable from default arguments with a complete introductory Dockerfile.

Docker / Compose✓ Tested
PythonIteration & sequences

Separate records into two lists

Python: Build two explicit partitions so callers can use both matching and rejected values.

Python✓ Tested
Docker / ComposeGetting Started

Set a default non-root image user

Docker / Compose: Set a default non-root image user with a complete introductory Dockerfile.

Docker / Compose✓ Tested
Docker / ComposeBuild images

Set a working directory

Choose the default directory for later instructions and the running process.

Dockerfile✓ Tested
Docker / ComposeBuild images

Set an image’s default command

Use JSON array syntax for a predictable command.

Dockerfile✓ Tested
Docker / ComposeDockerfile patterns

Set copied files’ numeric ownership

Docker / Compose: COPY --chown sets ownership while adding the file.

Docker / Compose✓ Tested
PowerShellFunctions & control

Transform each item in a collection

Build a result array with a foreach expression.

foreach✓ Tested