-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·26 lines (18 loc) · 863 Bytes
/
build.sh
File metadata and controls
executable file
·26 lines (18 loc) · 863 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
#!/bin/bash
IMAGE="kubesail/sync"
TAG="${IMAGE}:v$(cat VERSION.txt)"
# Enable docker experimental mode:
# - echo '{ "experimental": true }' > /etc/docker/daemon.json
# - echo '{ "experimental": "enabled" }' > ~/.docker/config.json
# install buildx (https://github.com/docker/buildx/releases)
# docker buildx create --name mybuilder
# docker buildx use mybuilder
# docker buildx inspect --bootstrap
# docker run --privileged --rm tonistiigi/binfmt --install all
# Troubleshooting:
# buildx stop... buildx inspect --bootstrap
./bin/generate_self_signed_cert.sh
BUILDX_PREFIX="docker buildx"
command -v buildx > /dev/null && BUILDX_PREFIX="buildx"
DOCKER_BUILDKIT=1 ${BUILDX_PREFIX} build --pull --platform linux/amd64,linux/arm64 -t ${TAG} --push .
DOCKER_BUILDKIT=1 ${BUILDX_PREFIX} build --platform linux/amd64,linux/arm64 -t "${IMAGE}:latest" --push .