website icon indicating copy to clipboard operation
website copied to clipboard

Docker bind mount wrong chown instructions provided when verdaccio >= v4.0

Open coolsp opened this issue 5 years ago • 6 comments

Following note in the Docker-doc specifies the wrong chown user:group:

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 100:101 /opt/verdaccio otherwise you will get permission errors at runtime. Use docker volume is recommended over using bind mount.

This used to work pre v4.0 but, inspecting the Dockerfile for v4.0 and looking in the container shows:

  • user 'verdaccio' id: 10001
  • belonging to group 'nogroup' with id: 65533

So, chown instructions in the note should read: sudo chown -R 10001:65533 /opt/verdaccio

There is also an indication of this in the original note itself as it mentions uid=10001

coolsp avatar May 31 '19 06:05 coolsp

That's actually my bad 😢

juanpicado avatar Jun 04 '19 11:06 juanpicado

Hi! Do you mind if I take this one on?

ShawnToubeau avatar Oct 05 '19 19:10 ShawnToubeau

Go ahead, do you know where ?

juanpicado avatar Oct 05 '19 19:10 juanpicado

Ya I think so! I'll let you know if I have any trouble 👍

ShawnToubeau avatar Oct 05 '19 19:10 ShawnToubeau

Just opened a PR~ https://github.com/verdaccio/website/pull/196 Lmk if it looks good or if you need any changes 😄

ShawnToubeau avatar Oct 05 '19 19:10 ShawnToubeau

Update: I was having trouble undoing my pushed changes so I started from scratch here: https://github.com/verdaccio/website/pull/197

ShawnToubeau avatar Oct 05 '19 21:10 ShawnToubeau