Download registry container $ docker pull registry Install fig $ sudo yum install python-pip $ sudo pip install -U fig Configure fig.yaml web: image: registry ports: - "5000:5000" volumes: - "~/data/registry:/registry" environment: - STORAGE_PATH=/registry Configure Nginx upstream docker-registry { server localhost:5000; } server { listen 80; server_name docker-registry.exmple.com; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; client_max_body_size 0; # required to avoid HTTP 411: see Issue #1486 (https://github.com/dotcloud/docker/issues/1486) chunked_transfer_encoding on; location / { proxy_pass http://docker-registry; } location /_ping { auth_basic off; proxy_pass http://docker-registry; } location /v1/_ping { auth_basic off; proxy_pass http://docker-registry; } } Start Nginx $ sudo nginx -t $ sudo service nginx start Run container with fig $ fig up
Allow insecure-registry # in /etc/sysconfig/docker other_args='--insecure-registry docker-registry.example.com' Restart Docker $ sudo service docker restart Add tag to a container image $ docker tag nkwhr/my_app docker-registry.example.com/my_app Push container image $ docker push docker-registry.example.com/my_app