2015-05-23 01:39:45 +02:00
|
|
|
#!/bin/sh
|
2015-05-27 02:50:27 +02:00
|
|
|
set -e
|
2015-05-23 01:39:45 +02:00
|
|
|
|
2015-08-06 01:26:34 +02: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-23 01:39:45 +02:00
|
|
|
hostname=$1
|
2015-05-27 02:50:27 +02:00
|
|
|
if [ "$hostname" = "" ]; then
|
2015-05-23 01:39:45 +02:00
|
|
|
hostname="localhost"
|
|
|
|
fi
|
|
|
|
|
2015-05-28 00:42:59 +02: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-23 01:39:45 +02:00
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5440
|
2015-05-27 02:50:27 +02:00
|
|
|
cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5440/ca.crt
|
2015-05-23 01:39:45 +02:00
|
|
|
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5441
|
2015-05-27 02:50:27 +02:00
|
|
|
cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5441/ca.crt
|
2015-05-23 01:39:45 +02:00
|
|
|
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5442
|
2015-05-27 02:50:27 +02: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-23 01:39:45 +02:00
|
|
|
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5443
|
2015-05-27 02:50:27 +02: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-23 01:39:45 +02:00
|
|
|
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5444
|
2015-05-27 02:50:27 +02: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-23 01:39:45 +02:00
|
|
|
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5447
|
2015-05-27 02:50:27 +02: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-23 01:39:45 +02:00
|
|
|
|
2015-05-27 02:50:27 +02:00
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5448
|
|
|
|
cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5448/ca.crt
|