-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild-images.sh
33 lines (28 loc) · 968 Bytes
/
build-images.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
#!/bin/bash
set -e
images=()
repobase="${REPOBASE:-ghcr.io/nethserver}"
reponame="ldapproxy"
container=$(buildah from scratch)
buildah add "${container}" imageroot /imageroot
buildah add "${container}" ui /ui
buildah config \
--label="org.nethserver.min-core=3.2.2" \
--label="org.nethserver.authorizations=node:portsadm" \
--label='org.nethserver.tcp-ports-demand=1024' \
--label='org.nethserver.flags=core_module no_data_backup' \
--label="org.nethserver.images=docker.io/library/nginx:1.27.4-alpine" \
--entrypoint=/ "${container}"
buildah commit "${container}" "${repobase}/${reponame}"
images+=("${repobase}/${reponame}")
#
#
#
if [[ -n "${CI}" ]]; then
# Set output value for Github Actions
printf "::set-output name=images::%s\n" "${images[*]}"
else
printf "Publish the images with:\n\n"
for image in "${images[@]}"; do printf " buildah push %s docker://%s:latest\n" "${image}" "${image}" ; done
printf "\n"
fi