Skip to content

Instantly share code, notes, and snippets.

@carmark
Last active July 14, 2016 10:25
Show Gist options
  • Save carmark/b9c3ac501b521f2b86f8bd93b4b5ccbf to your computer and use it in GitHub Desktop.
Save carmark/b9c3ac501b521f2b86f8bd93b4b5ccbf to your computer and use it in GitHub Desktop.
docker compose hyper compose detail
build Yes No
cap_add Yes No Add container capabilities.
cap_drop Yes No Drop container capabilities.
command Yes Yes Override the default command.
cgroup_parent Yes No Specify an optional parent cgroup for the container.
container_name Yes Yes Specify a custom container name, rather than a generated default name.
devices Yes No List of device mappings.
depends_on Yes Yes Express dependency between services.
dns Yes No Custom DNS servers. Can be a single value or a list.
dns_search Yes No Custom DNS search domains. Can be a single value or a list.
tmpfs Yes No Mount a temporary file system inside the container.
entrypoint Yes Yes Override the default entrypoint.
env_file Yes Yes Add environment variables from a file.
environment Yes Yes Add environment variables.
expose Yes Yes Expose ports without publishing them to the host machine. (support later)
extends Yes Yes Extend another service, in the current file or another, optionally overriding configuration.
external_links Yes Yes Link to containers started outside this docker-compose.yml or even outside of Compose
extra_hosts Yes No Add hostname mappings.
image Yes Yes Specify the image to start the container from.
labels Yes Yes Add metadata to containers using Docker labels.
links Yes Yes Link to containers in another service.
logging Yes No Logging configuration for the service.
log_driver Yes No Specify a log driver.
log_opt Yes No Specify logging options as key-value pairs.
net Yes No [v1 only]network mode
network_mode Yes No [v2 only]network mode
networks Yes No [v2 only]Networks to join.
aliases Yes No Aliases (alternative hostnames) for this service on the network.
ipv4_address Yes No Specify a static IP address for containers for this service when joining the network.
ipv6_address Yes No Specify a static IP address for containers for this service when joining the network.
pid Yes No Sets the PID mode to the host PID mode.
ports Yes Yes Expose ports.
security_opt Yes No Override the default labeling scheme for each container.
stop_signal Yes No Sets an alternative signal to stop the container.
ulimits Yes No Override the default ulimits for a container.
volumes Yes Yes Mount paths or named volumes.
volume_driver Yes No
volume_from Yes No Mount all of the volumes from another service or container
cpu_shares Yes No cpu_shares: 73
cpu_quota Yes No cpu_quota: 50000
cpuset Yes No cpuset: 0,1
domainname Yes Yes domainname: foo.com
hostname Yes Yes hostname: boo
ipc Yes No
mac_address Yes No mac_address: 02:42:ac:11:65:43
mem_limit Yes No
memswap_limit Yes No
privileged Yes No
read_only Yes No
restart Yes Yes restart: always
shm_size Yes No
stdin_open Yes Yes
tty Yes Yes
user Yes No
working_dir Yes Yes
Volume configuration Yes Yes
Network configuration Yes No
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment