-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathlocal-build.sh
executable file
·64 lines (53 loc) · 1.6 KB
/
local-build.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
#!/bin/bash -e
BLUE='\E[1;34m'
CYAN='\E[1;36m'
YELLOW='\E[1;33m'
GREEN='\E[1;32m'
RESET='\E[0m'
REGISTRY=${REGISTRY:-}
DOCKER_IMAGE="${REGISTRY}nginxproxymanager/nginx-full"
export OPENRESTY_VERSION=1.25.3.2
export CROWDSEC_OPENRESTY_BOUNCER_VERSION=0.1.7
export LUA_VERSION=5.1.5
export LUAROCKS_VERSION=3.3.1
export BASE_IMAGE="${DOCKER_IMAGE}:latest"
export ACMESH_IMAGE="${DOCKER_IMAGE}:acmesh"
export CERTBOT_IMAGE="${DOCKER_IMAGE}:certbot"
export CERTBOT_NODE_IMAGE="${DOCKER_IMAGE}:certbot-node"
export ACMESH_GOLANG_IMAGE="${DOCKER_IMAGE}:acmesh-golang"
# Builds
echo -e "${BLUE}❯ ${CYAN}Building ${YELLOW}latest ${CYAN}...${RESET}"
docker build \
--pull \
--build-arg OPENRESTY_VERSION \
--build-arg CROWDSEC_OPENRESTY_BOUNCER_VERSION \
--build-arg LUA_VERSION \
--build-arg LUAROCKS_VERSION \
-t "$BASE_IMAGE" \
-f docker/Dockerfile \
.
echo -e "${BLUE}❯ ${CYAN}Building ${YELLOW}acmesh ${CYAN}...${RESET}"
docker build \
--build-arg BASE_IMAGE \
-t "$ACMESH_IMAGE" \
-f docker/Dockerfile.acmesh \
.
echo -e "${BLUE}❯ ${CYAN}Building ${YELLOW}certbot ${CYAN}...${RESET}"
docker build \
--build-arg BASE_IMAGE \
-t "$CERTBOT_IMAGE" \
-f docker/Dockerfile.certbot \
.
echo -e "${BLUE}❯ ${CYAN}Building ${YELLOW}acmesh-golang ${CYAN}...${RESET}"
docker build \
--build-arg ACMESH_IMAGE \
-t "$ACMESH_GOLANG_IMAGE" \
-f docker/Dockerfile.acmesh-golang \
.
echo -e "${BLUE}❯ ${CYAN}Building ${YELLOW}certbot-node ${CYAN}...${RESET}"
docker build \
--build-arg CERTBOT_IMAGE \
-t "$CERTBOT_NODE_IMAGE" \
-f docker/Dockerfile.certbot-node \
.
echo -e "${BLUE}❯ ${GREEN}All done!${RESET}"