Results for “host”
Small, practical examples. Search by task or narrow things down below.
Add a fixed hostname mapping
Docker / Compose: extra_hosts adds an entry to the container’s hosts file.
Docker / Compose✓ Tested
Choose a service’s internal hostname
Docker / Compose: hostname controls the name reported inside the container.
Docker / Compose✓ Tested
Mount a host directory read-only
Expose existing files without allowing the container to change them.
bind mount✓ Tested
Read a URL’s host and path
Read a URL’s host and path using a complete Go program with explicit sample inputs.
Go✓ Tested
Set a container’s own hostname
Docker / Compose: hostname changes the name reported inside the container.
Docker / Compose✓ Tested
Set an example container hostname
Docker / Compose: Set an example container hostname using a locally available Ubuntu image.
Docker / Compose✓ Tested
Pack and unpack a network-order integer
Python: Use an explicit byte order so the binary format is independent of the host architecture.
Python✓ Tested
Pass an environment variable
Supply configuration without changing an image.
environment✓ Tested
Read a big-endian binary integer
C#: Use BinaryPrimitives when the protocol byte order differs from or must not depend on the host.
C#✓ Tested