I was testing out docker swarm using 3 ubuntu servers with the Docker snap. I was using the guide here:
https://docs.docker.com/engine/swarm/stack-deploy/
Is there any way to configure docker-compose or the ‘docker stack deploy’ to use a different location, or open it up to be read-write when using docker from the snap?
docker version
Client:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.4
Git commit: e68fc7a
Built: Tue May 7 17:57:34 2019
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.4
Git commit: e68fc7a
Built: Tue May 7 17:57:34 2019
OS/Arch: linux/amd64
Experimental: false
docker stack deploy --compose-file docker-compose.yml stackdemo
Ignoring unsupported options: build
Creating network stackdemo_default
Creating service stackdemo_web
Creating service stackdemo_redis
docker service ps stackdemo_web --no-trunc
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
56ncig1i2i12xrfm8plapn8pf stackdemo_web.1 swarm-master:5000/stackdemo:latest@sha256:b4fff10b4ec76f703aeb0550023af9d531f49a85e9246460c0ccbe91fac1486b swarm-node1 Ready Assigned less than a second ago
j4czjqey1w5ge3qi6tqz9h6zp \_ stackdemo_web.1 swarm-master:5000/stackdemo:latest@sha256:b4fff10b4ec76f703aeb0550023af9d531f49a85e9246460c0ccbe91fac1486b swarm-master Shutdown Rejected 4 seconds ago "mkdir /var/lib/docker: read-only file system"
nta5hfxpzumq1gfq4k9k22tpd \_ stackdemo_web.1 swarm-master:5000/stackdemo:latest@sha256:b4fff10b4ec76f703aeb0550023af9d531f49a85e9246460c0ccbe91fac1486b swarm-master Shutdown Rejected 9 seconds ago "mkdir /var/lib/docker: read-only file system"
r2x8zvd6g40h8mnyj8mp2i0kw \_ stackdemo_web.1 swarm-master:5000/stackdemo:latest@sha256:b4fff10b4ec76f703aeb0550023af9d531f49a85e9246460c0ccbe91fac1486b swarm-master Shutdown Rejected 15 seconds ago "mkdir /var/lib/docker: read-only file system"
vqh5djso41pys9k71x81wuuge \_ stackdemo_web.1 swarm-master:5000/stackdemo:latest@sha256:b4fff10b4ec76f703aeb0550023af9d531f49a85e9246460c0ccbe91fac1486b swarm-master Shutdown Rejected 19 seconds ago "mkdir /var/lib/docker: read-only file system"
vir9h0gl7ruruv0ex1d2afks8 \_ stackdemo_web.1 swarm-master:5000/stackdemo:latest@sha256:b4fff10b4ec76f703aeb0550023af9d531f49a85e9246460c0ccbe91fac1486b swarm-master Shutdown Rejected 25 seconds ago "mkdir /var/lib/docker: read-only file system"