-
Notifications
You must be signed in to change notification settings - Fork 2
/
update.sh
executable file
·42 lines (28 loc) · 1.17 KB
/
update.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
RELEASE_DIR="./src";
REPO_NAME="soulteary/prebuilt-nginx-modules"
set -a
. "$RELEASE_DIR/.env"
set +a
# Build For Alpine
TAG=base-$NGINX_VERSION-alpine;
DIST=$REPO_NAME:$TAG
echo "Build: $DIST";
echo $NGINX_VERSION:$NGINX_SHASUM
echo "docker build --build-arg NGINX_VERSION=$NGINX_VERSION --build-arg NGINX_SHASUM=$NGINX_SHASUM --tag $DIST -f "$RELEASE_DIR/Dockerfile.alpine" ."
docker build --build-arg NGINX_VERSION="$NGINX_VERSION" --build-arg NGINX_SHASUM="$NGINX_SHASUM" --tag $DIST -f "$RELEASE_DIR/Dockerfile.alpine" .
if [[ "$(docker images -q $DIST 2> /dev/null)" != "" ]]; then
echo "Push: $DIST";
docker push $DIST;
fi
# Build For Debian
TAG=base-$NGINX_VERSION;
DIST=$REPO_NAME:$TAG
echo "Build: $DIST";
echo $NGINX_VERSION:$NGINX_SHASUM
echo "docker build --build-arg NGINX_VERSION=$NGINX_VERSION --build-arg NGINX_SHASUM=$NGINX_SHASUM --tag $DIST -f "$RELEASE_DIR/Dockerfile.debian" ."
docker build --build-arg NGINX_VERSION="$NGINX_VERSION" --build-arg NGINX_SHASUM="$NGINX_SHASUM" --tag $DIST -f "$RELEASE_DIR/Dockerfile.debian" .
if [[ "$(docker images -q $DIST 2> /dev/null)" != "" ]]; then
echo "Push: $DIST";
docker push $DIST;
fi