Sign inSign up

modit/docker-registry-nginx

By modit

•Updated almost 11 years ago

A single container that runs the docker registry and nginx

Image
0

290

modit/docker-registry-nginx repository overview

Dockerfile

FROM samalba/docker-registry:latest

RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y

RUN apt-get install -y nginx supervisor
RUN mkdir -p /var/log/supervisor
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf

RUN echo "daemon off;" >> /etc/nginx/nginx.conf
RUN rm /etc/nginx/sites-enabled/default

EXPOSE 80 443
CMD ["/usr/bin/supervisord"]

supervisord.conf

[supervisord]
nodaemon=true

[program:registry]
command=/docker-registry/run.sh

[program:nginx]
command=/usr/sbin/nginx

Example usage

docker run -d --name registry -p 5000:80 \
  -v /root/registry/.htpasswd:/etc/nginx/htpasswd/docker-registry:ro \
  -v /root/registry/nginx.conf:/etc/nginx/sites-enabled/docker-registry:ro \
  -v /root/registry/logs:/var/log/nginx/:rw \
  -v /root/registry/config.yml:/registry-conf/config.yml:ro \
  -e DOCKER_REGISTRY_CONFIG=/registry-conf/config.yml \
  -e SETTINGS_FLAVOR=prod \
  modit/docker-registry-nginx

Tag summary

Content type

Image

Digest

sha256:9bcf3cc16…

Size

174.1 MB

Last updated

almost 11 years ago

docker pull modit/docker-registry-nginx