1a6949134e
When running a different version of docker outside of the default in the integration image, then commands will fail with mismatched version unless the docker binary is specified to the correct version. Add various cleanups to run script. Run all commands interacting with docker inside the container in an exec. Remove port binding to outside of container since all commands run inside. Trap docker rm to exit in case of failure which prevents final command from running. Do no copy images when $DOCKER_VOLUME is specified, this allows for faster runs when mounting a volume with a warm image cache. Move exec and graph driver defaulting into run engine script. Remove duplicated update of /etc/hosts. Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
39 lines
1.7 KiB
Bash
39 lines
1.7 KiB
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
hostname=$1
|
|
if [ "$hostname" = "" ]; then
|
|
hostname="localhost"
|
|
fi
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5011
|
|
cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5011/ca.crt
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5440
|
|
cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5440/ca.crt
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5441
|
|
cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5441/ca.crt
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5442
|
|
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
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5443
|
|
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
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5444
|
|
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
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5447
|
|
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
|
|
|
|
mkdir -p /etc/docker/certs.d/$hostname:5448
|
|
cp ./nginx/ssl/registry-ca+ca.pem /etc/docker/certs.d/$hostname:5448/ca.crt
|