Docker.Commands.Create (docker_wrapper v0.1.2)

Copy Markdown View Source

Implements the Docker.Command behaviour for docker create.

Creates a container without starting it. Accepts the same options as Docker.Commands.Run but produces a container ID without running.

Examples

import Docker.Commands.Create

"nginx:alpine"
|> new()
|> name("my-nginx")
|> port(8080, 80)
|> Docker.create()

Summary

Types

t()

@type t() :: %Docker.Commands.Create{
  cap_add: term(),
  cap_drop: term(),
  command: term(),
  cpus: term(),
  entrypoint: term(),
  env: term(),
  env_file: term(),
  extra_args: term(),
  hostname: term(),
  image: term(),
  init: term(),
  interactive: term(),
  labels: term(),
  memory: term(),
  name: term(),
  network: term(),
  platform: term(),
  ports: term(),
  privileged: term(),
  read_only: term(),
  restart: term(),
  tty: term(),
  user: term(),
  volumes: term(),
  workdir: term()
}

Functions

cap_add(cmd, cap)

cap_drop(cmd, cap)

command(cmd, args)

cpus(cmd, c)

entrypoint(cmd, e)

env(cmd, key, value)

env_file(cmd, path)

hostname(cmd, h)

init_flag(cmd)

interactive(cmd)

label(cmd, key, value)

memory(cmd, m)

name(cmd, n)

network(cmd, n)

new(image)

platform(cmd, p)

port(cmd, host, container, opts \\ [])

privileged(cmd)

raw(cmd, args)

read_only(cmd)

restart(cmd, r)

tty(cmd)

user(cmd, u)

volume(cmd, host, container, opts \\ [])

workdir(cmd, w)