forked from TrueCloudLab/distribution
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)
15 lines
411 B
Bash
Executable file
15 lines
411 B
Bash
Executable file
#!/bin/sh
|
|
set -e
|
|
set -x
|
|
|
|
DOCKER_GRAPHDRIVER=${DOCKER_GRAPHDRIVER:-overlay}
|
|
EXEC_DRIVER=${EXEC_DRIVER:-native}
|
|
|
|
# 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
|
|
|
|
sh install_certs.sh localregistry
|
|
|
|
docker --daemon --log-level=panic \
|
|
--storage-driver="$DOCKER_GRAPHDRIVER" --exec-driver="$EXEC_DRIVER"
|