Improve this doc

docker-compose.yml fields

Supported fields

Field Details
build
cap_add
cap_drop
cgroup_parent
command
cpu_shares
cpu_quota
cpus
cpuset
devices
depends_on Only array form is supported
dns
dns_opt
dns_search
domainname
entrypoint
environment
expose
extra_hosts
group_add
healthcheck
hostname
image
init
ipc
labels
mac_address
mem_limit
mem_reservation
network_mode Only support bridge, host, or none
networks Only support specifiying network names
oom_kill_disable
oom_score_adj
pid Only support host or none
pids_limit
ports
privileged
read_only
restart
security_opt
shm_size
stop_grace_period
stop_signal
sysctls
tmpfs
ulimits
user
userns_mode
volumes Only support short syntax and named volumes. Bind mounts are not supported, except for as allowed by resin.io specific labels
working_dir

Known unsupported fields

Field Details
blkio_config
container_name Used by the device supervisor
cpu_count
cpu_percent
external_links
isolation
links
logging
memswap_limit
mem_swappiness
runtime
scale
stdin_open
tty
volume_driver
volumes_from

Labels

Label Default Description
io.resin.features.balena-socket false Bind mounts the balena container engine socket into the container
io.resin.features.dbus false Bind mounts the host OS dbus into the container using /run/dbus:/host/run/dbus
io.resin.features.kernel-modules false Bind mounts the host OS /lib/modules into the container. (i.e. /lib/modules:/lib/modules)
io.resin.features.firmware false Bind mounts the host OS /lib/firmware into the container
io.resin.features.supervisor-api false Ensures that RESIN_SUPERVISOR_HOST, RESIN_SUPERVISOR_PORT, RESIN_SUPERVISOR_ADDRESS, and RESIN_SUPERVISOR_API_KEY are added to the container environment variables, so the supervisor API can be used. (Currently will only work for services that have network_mode = host or bridge )
io.resin.features.resin-api false When enabled, it will make sure that RESIN_API_KEY is added to the container environment variables
io.resin.update.strategy download-then-kill Set the application update strategy
io.resin.update.handover-timeout 60000 Time, in milliseconds, before an old container is automatically killed. Only used with the hand-over update strategy.