Docker.Container (excontainers v0.3.1) View Source

Specification for a container.

Link to this section Summary

Functions

Creates a container from the given image.

Sets a file or the directory on the host machine to be mounted into a container.

Sets an environment variable to the container.

Adds a port to be exposed on the container.

Sets a label to apply to the container object in docker.

Link to this section Functions

Creates a container from the given image.

Options

  • bind_mounts sets the files or the directories on the host machine to mount into the container.
  • cmd sets the command to run in the container
  • environment sets the environment variables for the container
  • exposed_ports sets the ports to expose to the host
  • privileged indicates whether the container should run in privileged mode (default false)
  • wait_strategy sets the strategy to adopt to determine whether the container is ready for use
  • auto_remove whether to automatically remove the container after it's stopped (default true)
Link to this function

with_bind_mount(config, host_src, container_dest, options \\ "ro")

View Source

Sets a file or the directory on the host machine to be mounted into a container.

Link to this function

with_environment(config, key, value)

View Source

Sets an environment variable to the container.

Link to this function

with_exposed_port(config, port)

View Source

Adds a port to be exposed on the container.

Link to this function

with_label(config, key, value)

View Source

Sets a label to apply to the container object in docker.