2015-05-22 23:39:45 +00:00
|
|
|
#!/bin/sh
|
2015-05-27 00:50:27 +00:00
|
|
|
set -e
|
2015-05-22 23:39:45 +00:00
|
|
|
|
2015-08-05 23:26:34 +00:00
|
|
|
# Set IP address in /etc/hosts for localregistry
|
|
|
|
IP=$(ifconfig eth0|grep "inet addr:"| cut -d: -f2 | awk '{ print $1}')
|
|
|
|
echo "$IP localregistry" >> /etc/hosts
|
|
|
|
|
2015-05-22 23:39:45 +00:00
|
|
|
hostname=$1
|
2015-05-27 00:50:27 +00:00
|
|
|
if [ "$hostname" = "" ]; then
|
2015-05-22 23:39:45 +00:00
|
|
|
hostname="localhost"
|
|
|
|
fi
|
|
|
|
|
2015-05-27 22:42:59 +00:00
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5011
|
|
|
|
cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5011/ca.crt
|
|
|
|
|
2015-05-22 23:39:45 +00:00
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5440
|
2015-05-27 00:50:27 +00:00
|
|
|
cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5440/ca.crt
|
2015-05-22 23:39:45 +00:00
|
|
|
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5441
|
2015-05-27 00:50:27 +00:00
|
|
|
cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5441/ca.crt
|
2015-05-22 23:39:45 +00:00
|
|
|
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5442
|
2015-05-27 00:50:27 +00:00
|
|
|
cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5442/ca.crt
|
|
|
|
cp ./nginx/ssl/registry-ca+client-cert.pem /etc/docker/certs.d/$hostname:5442/client.cert
|
|
|
|
cp ./nginx/ssl/registry-ca+client-key.pem /etc/docker/certs.d/$hostname:5442/client.key
|
2015-05-22 23:39:45 +00:00
|
|
|
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5443
|
2015-05-27 00:50:27 +00:00
|
|
|
cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5443/ca.crt
|
|
|
|
cp ./nginx/ssl/registry-noca+client-cert.pem /etc/docker/certs.d/$hostname:5443/client.cert
|
|
|
|
cp ./nginx/ssl/registry-noca+client-key.pem /etc/docker/certs.d/$hostname:5443/client.key
|
2015-05-22 23:39:45 +00:00
|
|
|
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5444
|
2015-05-27 00:50:27 +00:00
|
|
|
cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5444/ca.crt
|
|
|
|
cp ./nginx/ssl/registry-ca+client-cert.pem /etc/docker/certs.d/$hostname:5444/client.cert
|
|
|
|
cp ./nginx/ssl/registry-ca+client-key.pem /etc/docker/certs.d/$hostname:5444/client.key
|
2015-05-22 23:39:45 +00:00
|
|
|
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5447
|
2015-05-27 00:50:27 +00:00
|
|
|
cp ./nginx/ssl/registry-ca+client-cert.pem /etc/docker/certs.d/$hostname:5447/client.cert
|
|
|
|
cp ./nginx/ssl/registry-ca+client-key.pem /etc/docker/certs.d/$hostname:5447/client.key
|
2015-05-22 23:39:45 +00:00
|
|
|
|
2015-05-27 00:50:27 +00:00
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5448
|
|
|
|
cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5448/ca.crt
|