-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathbuildx
More file actions
executable file
·35 lines (28 loc) · 847 Bytes
/
buildx
File metadata and controls
executable file
·35 lines (28 loc) · 847 Bytes
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
#!/bin/bash -e
BLUE='\E[1;34m'
CYAN='\E[1;36m'
YELLOW='\E[1;33m'
GREEN='\E[1;32m'
RESET='\E[0m'
echo -e "${BLUE}❯ ${CYAN}Building docker multiarch: ${YELLOW}${*}${RESET}"
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${DIR}/.."
# Buildx Builder
docker buildx create --name "${BUILDX_NAME:-nginx-full}" || echo
docker buildx use "${BUILDX_NAME:-nginx-full}"
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/7 \
--progress plain \
--pull \
--build-arg BASE_IMAGE \
--build-arg ACMESH_IMAGE \
--build-arg CERTBOT_IMAGE \
--build-arg OPENRESTY_VERSION \
--build-arg LUA_VERSION \
--build-arg LUAROCKS_VERSION \
--build-arg CROWDSEC_OPENRESTY_BOUNCER_VERSION \
--build-arg CSR_VERSION \
$@ \
.
docker buildx rm "${BUILDX_NAME:-nginx-full}"
echo -e "${BLUE}❯ ${GREEN}Multiarch build Complete${RESET}"