pandora/docker/build.sh

18 lines
424 B
Bash
Raw Normal View History

2019-07-06 16:12:32 +00:00
#!/bin/sh
cd `dirname $0`
HOST=`/sbin/ip route | grep docker0 | awk '{ print $9 }'`
PORT=3142
nc -z "$HOST" "$PORT" > /dev/null 2>&1
result=$?
if [ $result -eq 0 ] ; then
proxy="--build-arg http_proxy=http://$HOST:$PORT"
else
proxy=
fi
2024-01-07 18:33:29 +00:00
docker build $proxy -t code.0x2620.org/0x2620/pandora-base base
docker build -t code.0x2620.org/0x2620/pandora-nginx nginx
2019-07-06 16:12:32 +00:00
cd ..
2024-01-07 18:33:29 +00:00
docker build -t code.0x2620.org/0x2620/pandora .