-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmake_containers.sh
More file actions
executable file
·47 lines (44 loc) · 1.31 KB
/
make_containers.sh
File metadata and controls
executable file
·47 lines (44 loc) · 1.31 KB
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
ARCH=$(uname -m)
if [ "$#" = "0" ]; then
CONTAINERS="createrepo publisher nginx repoclosure abf abf-service-sidekiq-worker isobuilder file-store redis"
else
CONTAINERS="$@"
fi
for CONTAINER in $CONTAINERS; do
case $CONTAINER in
abf)
SUBDIR="abf-service"
;;
abf-service-sidekiq-worker)
SUBDIR="abf-service-sidekiq"
;;
isobuilder)
SUBDIR="iso-builder"
;;
file-store)
SUBDIR="oma-file-store"
;;
*)
SUBDIR="abf-$CONTAINER"
;;
esac
pushd $SUBDIR/
if [ "$CONTAINER" = "createrepo" ]; then
if [ "$ARCH" != "x86_64" ]; then
sed -i -e '/ENV RARCH x86_64/d' Dockerfile.createrepo
fi
fi
if [ -e Dockerfile.${CONTAINER} ]; then
docker build --tag=openmandriva/${CONTAINER}:${ARCH} --file Dockerfile.${CONTAINER} .
else
docker build --tag=openmandriva/${CONTAINER}:${ARCH} --file Dockerfile .
fi
docker push openmandriva/${CONTAINER}:${ARCH}
popd
docker manifest create openmandriva/${CONTAINER}:latest \
--amend openmandriva/${CONTAINER}:x86_64 \
--amend openmandriva/${CONTAINER}:aarch64
docker manifest annotate openmandriva/${CONTAINER}:latest openmandriva/${CONTAINER}:x86_64 --os linux --arch amd64
docker manifest annotate openmandriva/${CONTAINER}:latest openmandriva/${CONTAINER}:aarch64 --os linux --arch arm64
docker manifest push openmandriva/${CONTAINER}:latest
done