Last active
August 29, 2015 14:17
-
-
Save yupadhyay/f90e52b6ce10799f3752 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install Docker Client | |
yum -y remove docker | |
yum install docker-io | |
yum -y update docker-io | |
#This will start docker deamon | |
service docker start | |
#Install docker registry | |
yum install python-devel libevent-devel python-pip gcc xz-devel | |
python-pip install docker-registry[bugsnag,newrelic,cors] | |
mkdir -p /export/apps/docker/ | |
cd /export/apps/docker/ | |
git clone https://github.com/dotcloud/docker-registry.git | |
cd docker-registry | |
cp config/config_sample.yml config/config.yml | |
vi config/config.yml | |
#Change local path and index path as given in https://www.digitalocean.com/community/tutorials/how-to-set-up-a-private-docker-registry-on-ubuntu-14-04 | |
mkdir -p /export/apps/docker/registry | |
chmod 777 /export/apps/docker/registry | |
/etc/init.d/iptables stop | |
cp config/config.yml /usr/lib/python2.6/site-packages/docker_registry/lib/../../config | |
mkdir -p /export/apps/docker-registry/logs | |
gunicorn --access-logfile /export/apps/docker-registry/logs/access.log --error-logfile /export/apps/docker-registry/logs/server.log -k gevent --max-requests 100 --graceful-timeout 3600 -t 3600 -b 0.0.0.0:5000 -w 8 docker_registry.wsgi:application & | |
#Now install nginx for proxy and https access | |
yum install nginx apache2-utils | |
vi /etc/yum.conf | |
#Copy data as given in https://www.digitalocean.com/community/tutorials/how-to-set-up-a-private-docker-registry-on-ubuntu-14-04 | |
yum install nginx apache2-utils | |
yum install httpd-tools | |
#Create a user for secure access | |
htpasswd -c /etc/nginx/docker-registry.htpasswd admin | |
htpasswd /etc/nginx/docker-registry.htpasswd test | |
vi /etc/nginx/conf.d/docker-registry | |
#This is to avoid nginx error while start | |
mkdir /var/cache/nginx | |
mkdir /var/cache/nginx/client_temp | |
service nginx restart | |
#Protect Nginx | |
#All steps here https://www.digitalocean.com/community/tutorials/how-to-set-up-a-private-docker-registry-on-ubuntu-14-04 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment