verdaccio: Config path of docker container can't be mapped

If I want to run verdaccio on my unraid server, I can’t map the folders /config/ to a host folder. If I want to map them, the container won’t start. There are no logs.

The same occurs when I want to start the start the container on my Windows 10 system with WSL2 by following command:

docker run -it --rm --name verdaccio -p 4873:4873 -v C:\temp\verdaccio\conf:/verdaccio/conf -v C:\temp\verdaccio\storage:/verdaccio/storage -v C:\temp\verdaccio\plugins:/verdaccio/plugins  verdaccio/verdaccio

If I run the container without the port mapping, it starts flawlessly by this command:

docker run -it --rm --name verdaccio -p 4873:4873  verdaccio/verdaccio

The container should start with mapped /config/ folder. Unfortunatly there is currently nothing more I could share with you.

I guess there is something strange with the permissions itself. IMHO there are missing permission mappings for the /config at this line:

https://github.com/verdaccio/verdaccio/blob/b02dab1c2f8fc9c2e7cafe6510535ff491a7b1aa/Dockerfile#L44

Unfortunatly I’m not that docker expert to debug this.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 35 (13 by maintainers)

Most upvoted comments

@juanpicado You can consider this a closed. Thank you for your patience and assistance 😃

Just created a PR. It’s my first contribution ever, so don’t be so hard with me.

Aaaaah. I guess this is the issue. I actually anticipated this file would be created automatically. LIke the default config when you start it via npm.

And now it’s working…

Would this be a good shot for the docker docs? I’ve read this section very carefully but I couldn’t find a hint for this.

😃 be my guest repo ‘verdaccio/website’ hint: read contributions guideline.

already tried it.but didn’t work

All other folders are ok.

🤔 https://github.com/verdaccio/verdaccio/pull/2249/files#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R50

It’s listed there, I wonder why does not work for you. Maybe someone else with Windows can give it a try @verdaccio/kubernetes @verdaccio/collaborators

If you add -e DEBUG=verdaccio* you will be able to see interesting debug code in the terminal

Oh totally forgot it, shame on me. Will try it later 😃 enjoy Father’s Day!

Actually I tried to set the permissions manually like stated in the docs

Note: Verdaccio runs as a non-root user (uid=10001) inside the container, if you use bind mount to override default, you need to make sure the mount directory is assigned to the right user. In above example, you need to run sudo chown -R 10001:65533 /path/for/verdaccio otherwise you will get permission errors at runtime. Use docker volume is recommended over using bind mount.

The permissions seems to be fine imho on my unraid server: image

But the container won’t start anyways. Only If I ditch the bind mapping of the config folder the container is starting.

the unraid is starting the container with this command:

docker run -d --name=‘verdaccio’ --net=‘bridge’ -e TZ=“Europe/Berlin” -e HOST_OS=“Unraid” -p ‘4873:4873/tcp’ -v ‘/mnt/user/appdata/verdaccio/storage/’:‘/verdaccio/storage’:‘rw’ -v ‘/mnt/user/appdata/verdaccio/plugins/’:‘/verdaccio/plugins’:‘rw’ -v ‘/mnt/user/appdata/verdaccio/conf/’:‘/verdaccio/conf’:‘rw’ -it ‘verdaccio/verdaccio’ f4bd058bdf6182e154f7f7c0a68831d9a27dfbe80c316520e8655d5d947ff880