Closed martinjrobins closed 1 year ago
@martinjrobins, please confirm this was closed by #50
nope, now get this error when I docker-compose up --build
⠙ Container galvanalyser-frontend-1 Creating
Error response from daemon: fill out specgen: must set source volume
Ah, we probably need to set it up like this, instead, then:
- frontend_node_modules:/app/node_modules/
Then at the bottom:
volumes:
frontend_node_modules:
If that works, can you push to v2.0.0, please?
no, get another error: Error response from daemon: fill out specgen: /app/node_modules: duplicate mount destination
Perhaps this is all version 3 stuff? (we are using version 2)
or perhaps this is podman issues (I'm using podman, not docker)
could be that I'm using an older version of podman (https://github.com/containers/podman/issues/11822) that has limited volume support. So I think it is my setup that is the issue :(
Our alternative plan here is to move the yarn install
into the up command, and leave the mounting as simply mounting the whole frontend directory.
We figured the overheads aren't huge, and keeping node_modules
directory accessible to the host system means that IDEs have an easier time doing deep code comprehension.
@martinjrobins are you happy to set it up with yarn install
in CMD/launch script? I guess we need to move the bottom bit of the Dockerfile
[_dev
] out into a shell script and set an envvar to determine which path to go down. On the bright side, we can drop Dockerfile_dev
.
The
frontend
service maps thefrontend
host dir to theapp
dir in the containerhowever, this means that the
yarn install
in the Dockerfile has no effect, you need to runyarn install
on the host for this to work