-
Notifications
You must be signed in to change notification settings - Fork 154
/
push-manifest-all-repo.sh
executable file
·50 lines (42 loc) · 1.93 KB
/
push-manifest-all-repo.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
#!/bin/bash
if [ -z ${1} ] ; then
echo "Repository not set. Provide a repository name in the format 'repo/'"
exit 1
fi
if [ -z ${2} ] ; then
echo "Username not set. Provide a docker registry username in the format 'sampleName'"
exit 1
fi
if [ -z ${3} ] ; then
echo "Password not set. Provide the docker registry password in the format 'p455w0rd'. You may need to escape special characters."
exit 1
fi
repo=${1}
username=${2}
password=${3}
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 --username ${username} --password ${password} 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 --username ${username} --password ${password} 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 --username ${username} --password ${password} push from-args \
--platforms linux/amd64,linux/arm64/v8 \
--template ${repo}docker-clamav:stretch-slim-ARCHVARIANT \
--target ${repo}docker-clamav:stretch-slim
./manifest-tool --username ${username} --password ${password} 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 --username ${username} --password ${password} 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
echo "Manifest-Push to docker registry finished."