docker-zfs-plugin
docker-zfs-plugin copied to clipboard
Use with docker stack
There is any option to use it with docker stack ? I try to deploy with
services:
grafana:
image: grafana/grafana:5.1.0
user: '104'
volumes:
- docker/volumes/swarmpit-grafana:/var/lib/grafana
volumes:
grafana-data:
driver: zfs
driver_opts:
name: docker/volumes/grafana
but it don't work, container don't start from command line docker volume create -d zfs --name=docker/volumes/grafana works
Are you sure you wrote the yaml correctly?
volumes:
data:
name: "rpool/docker-volumes/monitoring/tsdb-data"
driver: "zfs"
driver_opts:
atime: "off"
That's what I use, works perfectly.
what version do you use ? I have error: Stack update failed. name Additional property name is not allowed
code:
version: '3.3'
services:
redis:
image: redis:alpine
networks:
- default
logging:
driver: json-file
web:
image: nginx:latest
volumes:
- data:/var/log/nginx
networks:
- default
logging:
driver: json-file
networks:
default:
driver: overlay
volumes:
data:
name: "docker/volumes/test1"
driver: "zfs"
driver_opts:
atime: "off"
Oh I misread partially, sorry - still morning for me. Managed to read Docker compose before. That being said, I'm using docker-compose.yml version 2.4 😄
no-problem ;) with docker-compose this works... for docker stack I have only workaround to create volme then:
...
volumes:
- data:/data
volumes:
data:
external:
name: docker/volumes/data
I have error: Stack update failed. name Additional property name is not allowed
code:
version: '3.3' (...)
@piotr-sikora-v The name property for the volumeskey was added in version 3.4 of the compose file. Unless you have something incompatible with this version in your compose file, changing the version of your compose file to 3.4 (or higher) should work.
P.S. Yes, I mean it should work also for docker stack deploy, not just for docker-compose.