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
Need help for customize registry 2.0 #1082
Comments
I've never found a need to build a custom Dockerfile.
the STAR_zzt_net.key file is my SSL certificate pem file for the domain I have it on. |
Hi Taxilian, Thanks for your reply. What I want to achieve is to make the ownership of the bind mounted volume in host server NOT root. I hope customize the registry allow me to set the ownership. Does anyone have idea how to do it? thanks, |
Have you tried just passing -u other_user when doing docker run? (I haven't tried this, but I don't know of any reason that registry would care what user it runs as) |
I tried but the directory of the bind mount volume in host server still owned by root. |
Personally I just map that to a directory on the host filesystem and then chown it myself. I haven't tested this with this image. What are the log messages when you try to push with your customized image? |
This is more of a question for |
Hi,
I'm new to docker. I don't know if it is right place to get help for this kind of problem.
I want to run a private registry with bind-mount volume that maps to a local directory. When I finish with the registry, I would like to remove the registry and the local directory of the bind-mount volume. I found that the command "docker rm -v " does not remove the bind-mount volume directory. And the bind-mount volume created is owned by "root". As a non-root user, I have no right remove this directory.
I tried to start by registry with "-u" option but still the bind-mount volume directory still owned by root. Is there anyway to run docker registry 2.X with bind-mount volume owned by non-root? Or is there anyway to remove the bind-mount volume directory without root right?
I see someone suggested to customized registry to run as non-root user. I only able to find a sample for registry version 1.X and I'm not able to push any image to the customized registry. Can anyone show me a sample Dockerfile that customize registry version 2.X?
Here is my Dockerfile:
FROM registry:2
MAINTAINER abc@def.com
docker-archive/docker-registry#892
ENV GUNICORN_OPTS ["--preload"]
RUN adduser --system jerryc
&& addgroup docker
&& chown -R jerryc:docker /var/lib/registry
USER jerryc
CMD ["/etc/docker/registry/config.yml"]
thanks,
Jerry
The text was updated successfully, but these errors were encountered: