docker-latest-create (1) - Linux Manuals
docker-latest-create: Create a new container
NAME
docker-create - Create a new container
SYNOPSIS
docker create [-a|--attach[=[]]] [--add-host[=[]]] [--blkio-weight[=[BLKIO-WEIGHT]]] [--blkio-weight-device[=[]]] [--cpu-shares[=0]] [--cap-add[=[]]] [--cap-drop[=[]]] [--cgroup-parent[=CGROUP-PATH]] [--cidfile[=CIDFILE]] [--cpu-period[=0]] [--cpu-quota[=0]] [--cpuset-cpus[=CPUSET-CPUS]] [--cpuset-mems[=CPUSET-MEMS]] [--device[=[]]] [--device-read-bps[=[]]] [--device-read-iops[=[]]] [--device-write-bps[=[]]] [--device-write-iops[=[]]] [--dns[=[]]] [--dns-search[=[]]] [--dns-opt[=[]]] [-e|--env[=[]]] [--entrypoint[=ENTRYPOINT]] [--env-file[=[]]] [--expose[=[]]] [--group-add[=[]]] [-h|--hostname[=HOSTNAME]] [--help] [-i|--interactive] [--ip[=IPv4-ADDRESS]] [--ip6[=IPv6-ADDRESS]] [--ipc[=IPC]] [--isolation[=default]] [--kernel-memory[=KERNEL-MEMORY]] [-l|--label[=[]]] [--label-file[=[]]] [--link[=[]]] [--link-local-ip[=[]]] [--log-driver[=[]]] [--log-opt[=[]]] [-m|--memory[=MEMORY]] [--mac-address[=MAC-ADDRESS]] [--memory-reservation[=MEMORY-RESERVATION]] [--memory-swap[=LIMIT]] [--memory-swappiness[=MEMORY-SWAPPINESS]] [--name[=NAME]] [--network-alias[=[]]] [--network[="bridge"]] [--oom-kill-disable] [--oom-score-adj[=0]] [-P|--publish-all] [-p|--publish[=[]]] [--pid[=[PID]]] [--userns[=[]]] [--pids-limit[=PIDS_LIMIT]] [--privileged] [--read-only] [--restart[=RESTART]] [--security-opt[=[]]] [--storage-opt[=[]]] [--stop-signal[=SIGNAL]] [--shm-size[=[]]] [--sysctl[=[]]] [-t|--tty] [--tmpfs[=[CONTAINER-DIR[:<OPTIONS>]]] [-u|--user[=USER]] [--ulimit[=[]]] [--uts[=[]]] [-v|--volume[=[[HOST-DIR:]CONTAINER-DIR[:OPTIONS]]]] [--volume-driver[=DRIVER]] [--volumes-from[=[]]] [-w|--workdir[=WORKDIR]] IMAGE [COMMAND] [ARG...]
DESCRIPTION
Creates a writeable container layer over the specified image and prepares it for running the specified command. The container ID is then printed to STDOUT. This is similar to docker run -d except the container is never started. You can then use the docker start <container_id> command to start the container at any point.
The initial status of the container created with docker create is 'created'.
OPTIONS
-a, --attach=[]
Attach to STDIN, STDOUT or STDERR.
--add-host=[]
--blkio-weight=0
--blkio-weight-device=[]
--cpu-shares=0
--cap-add=[]
--cap-drop=[]
--cgroup-parent=""
--cidfile=""
--cpu-period=0
--cpuset-cpus=""
--cpuset-mems=""
If you have four memory nodes on your system (0-3), use --cpuset-mems=0,1
then processes in your Docker container will only use memory from the first
two memory nodes.
--cpu-quota=0
--device=[]
--device-read-bps=[]
--device-read-iops=[]
--device-write-bps=[]
--device-write-iops=[]
--dns=[]
--dns-opt=[]
--dns-search=[]
-e, --env=[]
--entrypoint=""
--env-file=[]
--expose=[]
--group-add=[]
-h, --hostname=""
--help
-i, --interactive=true|false
--ip=""
It can only be used in conjunction with --net for user-defined networks
--ip6=""
It can only be used in conjunction with --net for user-defined networks
--ipc=""
--isolation="default"
--kernel-memory=""
Constrains the kernel memory available to a container. If a limit of 0
is specified (not using --kernel-memory), the container's kernel memory
is not limited. If you specify a limit, it may be rounded up to a multiple
of the operating system's page size and the value can be very large,
millions of trillions.
-l, --label=[]
--label-file=[]
--link=[]
--link-local-ip=[]
--log-driver="json-file|syslog|journald|gelf|fluentd|awslogs|splunk|etwlogs|gcplogs|none"
--log-opt=[]
-m, --memory=""
Allows you to constrain the memory available to a container. If the host
supports swap memory, then the -m memory setting can be larger than physical
RAM. If a limit of 0 is specified (not using -m), the container's memory is
not limited. The actual limit may be rounded up to a multiple of the operating
system's page size (the value would be very large, that's millions of trillions).
--mac-address=""
--memory-reservation=""
After setting memory reservation, when the system detects memory contention
or low memory, containers are forced to restrict their consumption to their
reservation. So you should always set the value below --memory, otherwise the
hard limit will take precedence. By default, memory reservation will be the same
as memory limit.
--memory-swap="LIMIT"
The format of LIMIT is <number>[<unit>]. Unit can be b (bytes),
k (kilobytes), m (megabytes), or g (gigabytes). If you don't specify a
unit, b is used. Set LIMIT to -1 to enable unlimited swap.
--memory-swappiness=""
--name=""
--net="bridge"
Add a custom host-to-IP mapping
Block IO weight
Block IO weight
CPU shares
Add Linux capabilities
Drop Linux capabilities
Path to cgroups under which the cgroup for the container will be created. If the path is not absolute, the path is considered to be relative to the cgroups path of the init process. Cgroups will be created if they do not already exist.
Write the container ID to the file
CPUs in which to allow execution
Memory nodes
Limit the CPU CFS
Add a host device to the container
Set custom DNS servers
Set custom DNS options
Set custom DNS search domains
Set environment variables
Overwrite the default ENTRYPOINT of the image
Read in a line-delimited file of environment variables
Expose a port or a range of ports
Add additional groups to run as
Container host name
Keep STDIN open even if not attached. The default is
Sets the container's interface IPv4 address
Sets the container's interface IPv6 address
Default is to create a private IPC namespace
Isolation specifies the type of isolation technology used by containers. Note
that the default on Windows server is process, and the default on Windows client
is hyperv. Linux only supports default.
Kernel memory limit
Adds metadata to a container
Read labels from a file. Delimit each label with an EOL.
Add link to another container in the form of
<name or id>
Add one or more link-local IPv4/IPv6 addresses to the container's interface
Memory limit
Container MAC address
Memory soft limit
A limit value equal to memory plus swap. Must be used with the
Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100.
Assign a name to the container
Set the Network mode for the container