Docker Compose version 2 has a store_opts key. Docker compose 3 does not.
https://docs.docker.com/compose/compose-file/compose-file-v2/
I want to set the storage options of docker-compose to use the inmemory driver, because I'm using docker-compose for unit testing a database. How can I set the storage driver in docker-compose v3?
If you are looking to set inmemory, you can use type: tmpfs with driver_opts and mount it to your container:
version: '3'
services:
database:
image: postgres
tty: true
ports:
- "5432"
volumes:
- "mypartition:/path/to/my/partition"
- "/your/custom/path:/any/other/location"
volumes:
mypartition:
driver_opts:
type: tmpfs
o: "size=2g"
device: tmpfs
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