-
-
Notifications
You must be signed in to change notification settings - Fork 57
/
Copy pathbuild_imgs.sh
65 lines (52 loc) · 1.67 KB
/
build_imgs.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
NGINX_TAG="${NGINX_TAG:-1.27.0}"
# Dev certs init
echo "Building proxy:certs-init-development"
docker build nginx \
--tag "ghcr.io/hotosm/fmtm/proxy:certs-init-development" \
--target certs-init-development \
--build-arg NGINX_TAG="${NGINX_TAG}"
if [[ -n "$PUSH_IMGS" ]]; then
docker push "ghcr.io/hotosm/fmtm/proxy:certs-init-development"
fi
# Staging certs init
echo "Tagging proxy:certs-init-staging"
docker tag "ghcr.io/hotosm/fmtm/proxy:certs-init-development" \
"ghcr.io/hotosm/fmtm/proxy:certs-init-staging"
if [[ -n "$PUSH_IMGS" ]]; then
docker push "ghcr.io/hotosm/fmtm/proxy:certs-init-staging"
fi
# Main certs init
echo "Building proxy:certs-init-main"
docker build nginx \
--tag "ghcr.io/hotosm/fmtm/proxy:certs-init-main" \
--target certs-init-main \
--build-arg NGINX_TAG="${NGINX_TAG}"
if [[ -n "$PUSH_IMGS" ]]; then
docker push "ghcr.io/hotosm/fmtm/proxy:certs-init-main"
fi
# Dev proxy
echo "Building proxy:development"
docker build nginx \
--tag "ghcr.io/hotosm/fmtm/proxy:development" \
--target development \
--build-arg NGINX_TAG="${NGINX_TAG}"
if [[ -n "$PUSH_IMGS" ]]; then
docker push "ghcr.io/hotosm/fmtm/proxy:development"
fi
# Staging proxy
echo "Tagging proxy:staging"
docker tag "ghcr.io/hotosm/fmtm/proxy:development" \
"ghcr.io/hotosm/fmtm/proxy:staging"
if [[ -n "$PUSH_IMGS" ]]; then
docker push "ghcr.io/hotosm/fmtm/proxy:staging"
fi
# Main proxy
echo "Building proxy:main"
docker build nginx \
--tag "ghcr.io/hotosm/fmtm/proxy:main" \
--target main \
--build-arg NGINX_TAG="${NGINX_TAG}"
if [[ -n "$PUSH_IMGS" ]]; then
docker push "ghcr.io/hotosm/fmtm/proxy:main"
fi