-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
in the docker-compse file should set user: uid:gid
by id command get ,to avoid permission denied, mkdir
error
#3665
Comments
Go ahead, thanks for sharing that, I wasn't aware of that property 🙏 |
@juanpicado , I hope update the docment |
@luojiyin1987 looks a great idea, if you need help where to add this info, just update this two files at this repo. |
@juanpicado I create a PR. the docker-compose.yml should be : version: '3.1'
services:
verdaccio:
image: verdaccio/verdaccio
restart: always
container_name: 'verdaccio'
ports:
- '4873:4873'
volumes:
- './storage:/storage'
- './config:/conf'
- './plugins:/plugins' I want to know who maintain the docker file , I have some confusion. |
volumes set is no effect. chown -R user:user plugins storage and add user: 1000:1000 to docker-compose.yaml
|
I run docker history verdaccio/verdaccio
IMAGE CREATED CREATED BY SIZE COMMENT
63638b3bfaa0 2 weeks ago CMD ["/bin/sh" "-c" "verdaccio --config /ver… 0B buildkit.dockerfile.v0
<missing> 2 weeks ago ENTRYPOINT ["uid_entrypoint"] 0B buildkit.dockerfile.v0
<missing> 2 weeks ago VOLUME [/verdaccio/storage] 0B buildkit.dockerfile.v0
<missing> 2 weeks ago EXPOSE map[4873/tcp:{}] 0B buildkit.dockerfile.v0
<missing> 2 weeks ago USER 10001 0B buildkit.dockerfile.v0
<missing> 2 weeks ago RUN /bin/sh -c adduser -u $VERDACCIO_USER_UI… 5.12kB buildkit.dockerfile.v0
<missing> 2 weeks ago ADD docker-bin /opt/verdaccio/docker-bin # b… 243B buildkit.dockerfile.v0
<missing> 2 weeks ago ADD conf/docker.yaml /verdaccio/conf/config.… 7.35kB buildkit.dockerfile.v0
<missing> 2 weeks ago RUN /bin/sh -c npm install -g $VERDACCIO_APP… 35.2MB buildkit.dockerfile.v0
<missing> 2 weeks ago USER root 0B buildkit.dockerfile.v0
<missing> 2 weeks ago COPY /opt/tarball . # buildkit 688kB buildkit.dockerfile.v0
<missing> 2 weeks ago RUN /bin/sh -c mkdir -p /verdaccio/storage /… 0B buildkit.dockerfile.v0
<missing> 2 weeks ago RUN /bin/sh -c apk --no-cache add openssl du… 952kB buildkit.dockerfile.v0
<missing> 2 weeks ago WORKDIR /opt/verdaccio 0B buildkit.dockerfile.v0
<missing> 2 weeks ago ENV PATH=/opt/verdaccio/docker-bin:/usr/loca… 0B buildkit.dockerfile.v0
<missing> 2 weeks ago ENV VERDACCIO_APPDIR=/opt/verdaccio VERDACCI… 0B buildkit.dockerfile.v0
<missing> 2 weeks ago LABEL maintainer=https://github.com/verdacci… 0B buildkit.dockerfile.v0
<missing> 5 weeks ago /bin/sh -c #(nop) CMD ["node"] 0B
<missing> 5 weeks ago /bin/sh -c #(nop) ENTRYPOINT ["docker-entry… 0B
<missing> 5 weeks ago /bin/sh -c #(nop) COPY file:4d192565a7220e13… 388B
<missing> 5 weeks ago /bin/sh -c apk add --no-cache --virtual .bui… 7.78MB
<missing> 5 weeks ago /bin/sh -c #(nop) ENV YARN_VERSION=1.22.19 0B
<missing> 5 weeks ago /bin/sh -c addgroup -g 1000 node && addu… 159MB
<missing> 5 weeks ago /bin/sh -c #(nop) ENV NODE_VERSION=18.14.0 0B
<missing> 5 weeks ago /bin/sh -c #(nop) CMD ["/bin/sh"] 0B
<missing> 5 weeks ago /bin/sh -c #(nop) ADD file:40887ab7c06977737… 7.05MB I find <missing> 2 weeks ago USER 10001 0B buildkit.dockerfile.v0
```and
```shell
<missing> 2 weeks ago USER root 0B buildkit.dockerfile.v0 and <missing> 5 weeks ago /bin/sh -c addgroup -g 1000 node && addu… 159MB why use different user ? |
I use hadolint tool docker run --rm -i hadolint/hadolint hadolint "$@" - < Dockerfile
-:7 DL3018 warning: Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
-:7 DL3019 info: Use the `--no-cache` switch to avoid the need to use `--update` and remove `/var/cache/apk/*` when done installing packages
-:37 DL3018 warning: Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
-:39 DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
-:44 DL3020 error: Use COPY instead of ADD for files and folders
-:59 DL3025 warning: Use arguments JSON notation for CMD and ENTRYPOINT arguments |
it is My finish docker-compose.yml version: '3.1'
services:
verdaccio:
image: verdaccio/verdaccio
restart: always
user: 1000:1000
#container_name: 'verdaccio'
ports:
- '4873:4873'
volumes:
- './storage:/verdaccio/storage'
- './config:/verdaccio/conf'
- './plugins:/plugins' run the id
uid=1000(node2) gid=1000(node2) groups=1000(node2),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),110(lxd),999(docker),1001(microk8s) so add user set to docker-compose.yml file user: 1000:1000
|
user: 1000:1000
,to avoid permission denied, mkdir
error user: uid:gid
by id command get ,to avoid permission denied, mkdir
error
Your Environment
Describe the bug
when use local mirror , docker log
To Reproduce
Expected behavior
Screenshots, server logs, package manager log
Configuration File (cat ~/.config/verdaccio/config.yaml)
Environment information
Debugging output
Inspiration
before docker-compose file
I change it to
it work, no error!!!
I hope this is helpful to newbies。
this is my config file , it is in config folder。
├── config
│ └── config.yaml
Contribute to Verdaccio
The text was updated successfully, but these errors were encountered: