forked from mko-x/docker-clamav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-all.sh
executable file
·74 lines (57 loc) · 3.15 KB
/
build-all.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
66
67
68
69
70
71
72
73
74
#!/bin/bash
docker run --rm --privileged multiarch/qemu-user-static:register --reset
if [ -z ${1} ] ; then
echo "Repository not set. Provide a repository name in the format 'repo/'"
exit 1
fi
repo=${1}
docker build -t ${repo}docker-clamav:buster-slim-amd64 debian/buster/
docker build -t ${repo}docker-clamav:buster-slim-armv7 -f debian/buster/Dockerfile.arm32v7 debian/buster/
docker build -t ${repo}docker-clamav:buster-slim-arm64v8 -f debian/buster/Dockerfile.arm64v8 debian/buster/
docker push ${repo}docker-clamav:buster-slim-amd64
docker push ${repo}docker-clamav:buster-slim-armv7
docker push ${repo}docker-clamav:buster-slim-arm64v8
#armv7 cause problems in the moment
docker build -t ${repo}docker-clamav:stretch-slim-amd64 debian/stretch/
#docker build -t ${repo}docker-clamav:stretch-slim-armv7 -f debian/stretch/Dockerfile.arm32v7 debian/stretch/
docker build -t ${repo}docker-clamav:stretch-slim-arm64v8 -f debian/stretch/Dockerfile.arm64v8 debian/stretch/
docker push ${repo}docker-clamav:stretch-slim-amd64
#docker push ${repo}docker-clamav:stretch-slim-armv7
docker push ${repo}docker-clamav:stretch-slim-arm64v8
docker build -t ${repo}docker-clamav:alpine-amd64 alpine/main/
docker build -t ${repo}docker-clamav:alpine-armv7 -f alpine/main/Dockerfile.arm32v7 alpine/main/
docker build -t ${repo}docker-clamav:alpine-arm64v8 -f alpine/main/Dockerfile.arm64v8 alpine/main/
docker push ${repo}docker-clamav:alpine-amd64
docker push ${repo}docker-clamav:alpine-armv7
docker push ${repo}docker-clamav:alpine-arm64v8
docker build -t ${repo}docker-clamav:alpine-edge-amd64 alpine/edge/
docker build -t ${repo}docker-clamav:alpine-edge-armv7 -f alpine/edge/Dockerfile.arm32v7 alpine/edge/
docker build -t ${repo}docker-clamav:alpine-edge-arm64v8 -f alpine/edge/Dockerfile.arm64v8 alpine/edge/
docker push ${repo}docker-clamav:alpine-edge-amd64
docker push ${repo}docker-clamav:alpine-edge-armv7
docker push ${repo}docker-clamav:alpine-edge-arm64v8
if ! test -f manifest-tool ; then
echo Ensure compatible version of manifest tool https://github.com/estesp/manifest-tool
curl -Lo manifest-tool https://github.com/estesp/manifest-tool/releases/download/v1.0.3/manifest-tool-linux-amd64
chmod +x manifest-tool
fi
./manifest-tool push from-args \
--platforms linux/amd64,linux/arm/v7,linux/arm64/v8 \
--template ${repo}docker-clamav:buster-slim-ARCHVARIANT \
--target ${repo}docker-clamav:buster-slim
./manifest-tool push from-args \
--platforms linux/amd64,linux/arm/v7,linux/arm64/v8 \
--template ${repo}docker-clamav:buster-slim-ARCHVARIANT \
--target ${repo}docker-clamav:latest
./manifest-tool push from-args \
--platforms linux/amd64,linux/arm64/v8 \
--template ${repo}docker-clamav:stretch-slim-ARCHVARIANT \
--target ${repo}docker-clamav:stretch-slim
./manifest-tool push from-args \
--platforms linux/amd64,linux/arm/v7,linux/arm64/v8 \
--template ${repo}docker-clamav:alpine-ARCHVARIANT \
--target ${repo}docker-clamav:alpine
./manifest-tool push from-args \
--platforms linux/amd64,linux/arm/v7,linux/arm64/v8 \
--template ${repo}docker-clamav:alpine-edge-ARCHVARIANT \
--target ${repo}docker-clamav:alpine-edge