1
0
mirror of https://github.com/dcarrillo/docker-nginx.git synced 2025-07-04 03:29:25 +00:00

First commit

This commit is contained in:
2019-12-15 12:10:37 +01:00
commit 8084edf5fa
8 changed files with 1015 additions and 0 deletions

34
build.sh Executable file
View File

@ -0,0 +1,34 @@
#!/usr/bin/env sh
set -e
. "$(dirname "$0")"/conf.env
while [ $# -gt 0 ]; do
case $1 in
--push)
PUSH=true
shift
;;
--latest)
LATEST=true
shift
;;
*)
shift
;;
esac
done
docker build --build-arg=ARG_NGINX_VERSION="$NGINX_VERSION" \
--build-arg=ARG_NGX_GEOIP2_VERSION="$NGX_GEOIP2_VERSION" \
-t "$DOCKER_IMAGE":"$NGINX_VERSION" .
if [ x$PUSH = "xtrue" ]; then
docker push "$DOCKER_IMAGE":"$NGINX_VERSION"
fi
if [ x$LATEST = "xtrue" ]; then
docker tag "$DOCKER_IMAGE":"$NGINX_VERSION" "$DOCKER_IMAGE":latest
docker push "$DOCKER_IMAGE":latest
fi