-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
67 lines (55 loc) · 1.85 KB
/
justfile
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
set export
TAG := "dev"
update-digests:
podman manifest inspect registry.fedoraproject.org/fedora:38 | jq -r '.manifests | .[] | select(.platform.architecture == "arm64" or .platform.architecture == "amd64") | "digest_\(.platform.architecture)=\(.digest)"' | sort > images/fedbox/builddigests
build-fedbox $platform=arch():
#!/bin/bash
if [[ $platform == 'aarch64' ]]; then
platform='arm64'
fi
source images/fedbox/builddigests
var_name="digest_$platform"
echo $var_name
digest=${!var_name}
buildah bud \
--build-arg TAGORDIGEST="@$digest" \
--platform linux/$platform \
-f $PWD/images/fedbox/Dockerfile \
--format docker \
--tls-verify=true \
-t fedbox:$TAG-$platform \
--target fedbox \
--layers \
$PWD/images/fedbox
build-fedbox-codeserver platform=arch():
#!/bin/bash
if [[ $platform == 'aarch64' ]]; then
platform='arm64'
fi
source images/fedbox/builddigests
var_name="digest_$platform"
echo $var_name
digest=${!var_name}
buildah bud \
--build-arg TAGORDIGEST="@$digest" \
--platform linux/$platform \
-f $PWD/images/fedbox/Dockerfile \
--format docker \
--tls-verify=true \
-t fedbox:$TAG-$platform \
--target fedbox-codeserver \
--layers \
$PWD/images/fedbox
build-all: build-fedbox build-fedbox-codeserver
merge:
#!/bin/bash
set -ex
manifest=ghcr.io/smerschjohann/containers/fedbox-codeserver:latest
buildah manifest rm $manifest || true
buildah manifest create $manifest
for arch in "arm64" "amd64"; do
# would be cool if this is not required ..
buildah pull --arch $arch $manifest-$arch
buildah manifest add $manifest docker://$manifest-$arch
done
buildah push --all $manifest docker://$manifest