Results for “container”
Small, practical examples. Search by task or narrow things down below.
Set a container’s own hostname
Docker / Compose: hostname changes the name reported inside the container.
Docker / Compose✓ Tested
Set a container’s working directory
Docker / Compose: Set a container’s working directory using a locally available Ubuntu image.
Docker / Compose✓ Tested
Set an example container hostname
Docker / Compose: Set an example container hostname using a locally available Ubuntu image.
Docker / Compose✓ Tested
Start an existing container and attach to its output
Docker / Compose: create records the command; start with attach runs that existing container.
Docker / Compose✓ Tested
Stop a running container gracefully
Docker / Compose: stop sends the configured stop signal and waits before forcing termination.
Docker / Compose✓ Tested
Store a reference in a standard container
C++: reference_wrapper preserves reference semantics while behaving like a copyable container element.
C++✓ Tested
Use a fixed-size container with bounds checking
C++: std::array retains its element count and supports checked access through at.
C++✓ 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
Add and remove values at both ends
C++: Deque supports efficient end operations without requiring contiguous storage.
C++✓ Tested
Build a minimum-priority queue
C++: Supply greater as the comparator because priority_queue defaults to the largest value first.
C++✓ Tested