forked from TrueCloudLab/distribution
1e15b6e001
Previously, the strategy for avoiding lots of rebuilding and repulling for each Docker version being tested was to use a mountpoint to persist /var/lib/docker. This was pretty broken, and may not be a reliable strategy. This commit changes the scripts to instead build/pull images outside the innermost container, and copy them to the final test environment with docker save/docker load. This requires a fair amount of changes, since run.sh must now communicate with the Docker engine that was formerly started by test_runner.sh. The code that starts this engine has been broken out to run_engine.sh so that starting the engine and running the tests under it can be done separately (with the images loaded in between these steps). Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
42 lines
1.8 KiB
Bash
42 lines
1.8 KiB
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
# 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
|
|
|
|
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
|