Docker Community Forums

Share and learn in the Docker community.

Deploy docker registry


(120595) #1

i’ve tried this https://docs.docker.com/registry/deploying/#start-the-registry-automatically but when i run
$ docker run -d
-p 5000:5000
–restart=always
–name registry
registry:2
it could be: WARNING: could not open file '\etc\apt\sources.list\dpdg.list
is anyone have idea how to deploy (e.g : git) in docker registry?

thanks


(Cmooney) #2

So, step-by-step, can you pull the registry?

docker pull registry:2

If that works, then in our shop, we run the registry this way:

docker run -d -p 5000:5000 --restart always --name registry -v /mnt/docker/registry:/var/lib/registry registry:2

Which is essentially what you have, except we have a mount point for where the registry will store images. We have never had a problem with this running. We use both CentOS and RedHat hosts.

Your warning appears to indicate that the sources.list file on your (Ubuntu/Debian?) host might be missing… Is that the case?

Once you have it running, I suppose I’m a little confused by your next question. Are you wanting to run a central git repository in the container, or a git client? So far i have only found an image for gitlab on Docker Hub https://hub.docker.com/r/sameersbn/gitlab/. My experience with GitLab has not been positive in the past, but it definitely costs less cash than Stash or Bitbucket (which we use), but costs a lot in time.