1
= container; 2
= Swarm stack; 3
= Compose stack3
is limited to using the version "2"
stack format (this is a docker/libcompose limitation).true
= available to admins only; false
= available to all usersbind
property is defined, it will be used as the source of a bind mount. If a readonly
property is is defined and = true, the volume will be mounted in readonly
mode.8080:
) to define the port to be mapped on the host. If the host port is not specified, the Docker host will automatically assign it when starting the container.name:
and "<value>"
).privileged
mode. Defaults to false
if not specified.true
= start the container in privileged mode; false
= do not start the container in privileged modeforeground
mode. Defaults to false
if not specified.true
= start the container in foreground mode; false
= do not start the container in foreground mode"always"
if no value is specified."always"
Always restart the container regardless of the exit status."no"
Never automatically restart the container."on-failure"
Restart the container only if it exits with a non-zero status."unless-stopped"
Always restart the container regardless of the exit status (unless the container was manually stopped)."linux"
; "windows"
docker stack deploy
. A Compose stack will be deployed using the equivalent of docker-compose.
1
= container; 2
= Swarm stack; 3
= Compose stack3
is limited to using the version "2"
stack format (this is a docker/libcompose limitation).true
= available to admins only; false
= available to all users"linux"
; "windows"