forked from cfpb/consumerfinance.gov
-
Notifications
You must be signed in to change notification settings - Fork 0
/
attach.sh
executable file
·27 lines (25 loc) · 895 Bytes
/
attach.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh
docker ps > /dev/null 2>&1
if [ $? -ne 0 ]; then
# If the user hasn't eval'ed the docker-machine env, do it for them
if [ -z ${DOCKER_HOST} ] ||
[ -z ${DOCKER_CERT_PATH} ] ||
[ -z ${DOCKER_TLS_VERIFY} ] ||
[ -z ${DOCKER_MACHINE_NAME} ]; then
docker-machine status > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Can't find a working Docker -- please see our documentation:"
echo ""
echo "* Docker-based setup:"
echo " https://cfpb.github.io/cfgov-refresh/installation/#docker-compose-installation"
echo ""
echo "* Docker usage guide:"
echo " https://cfpb.github.io/cfgov-refresh/usage/#usage-docker"
echo ""
exit
else
eval $(docker-machine env)
fi
fi
fi
docker attach cfgovrefresh_python_1