#!/usr/bin/env sh
echo "Build docker image on your local machine."

# This make sure cd rails root as current workign dir.
cd "$(dirname "$0")"
cd ..

echo "Start build docker image."
# docker build -t photonicat-www .
docker build --build-arg http_proxy=http://192.168.31.197:8123 --build-arg https_proxy=http://192.168.31.197:8123 -t photonicat-www .
echo "Start zip docker image."
# docker save -o ./photonicat-www-docker.tar photonicat-www
docker save photonicat-www | gzip > photonicat-www-docker.tar.gz
echo "Created photonicat-www-docker.tar.gz"
