I'm trying to use the shm_size
option when building a docker image using docker compose
. My docker-compose.yml
looks like this:
version: '3'
services:
db:
build:
context: 'db'
shm_size: '6gb'
When I run this I see the error:
services.db.build contains unsupported option: 'shm_size'
Does anyone know why this isn't supported?
Running docker app on MacOS with these versions:
Engine: 18.03.1-ce
Compose: 1.21.1
Machine: 0.14.0
The shm_size option was added in 3.5 - https://docs.docker.com/compose/compose-file/#shm_size
Therefore the fix here was to specify the minor version for the compose file of at least 3.5:
version: '3.5'
services:
db:
build:
context: 'db'
shm_size: '6gb'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With