debian-forge-composer/schutzbot/containerbuild.sh
Tom Gundersen c3185466ae containers: simplify Dockerfile and container build
This changes the following:
 - Only produce one container. There is no particular benefit to
   supporting several different base containers, so unify on ubi
   as that is what we need ourselves.
 - Build directly from git. Now that the RPM we include in our
   container does not have any dependencies and only contains a
   couple of executables, the indirection via RPM has less value.
   Eventually the value will be reduced even further as we merge
   the entrypoint into the main binary and move dnf-json into the
   worker, leaving us with only a go binary. The only potential
   benefit might be that the build environment of RPMs is more
   clearly defined, but there is no real reason to believe that
   our mockbuild is any better than using the UBI golang build
   container.

This simplifies the container builds, and brings us more in line
with what is done in image-builder, and what is needed to deploy
to openshift.
2020-12-22 15:27:39 +01:00

21 lines
262 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
echo "Query host"
COMMIT=$(git rev-parse HEAD)
echo "Prepare host system"
sudo dnf -y install podman
echo "Build container"
podman \
build \
"--file=distribution/Dockerfile-ubi" \
"--tag=osbuild-composer:${COMMIT}" \
.