From 5034999449fa2262cc684e4f9e1576ebef5418d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Chavero?= Date: Fri, 14 Oct 2022 10:40:52 -0600 Subject: [PATCH] Add base image script --- .../base-micro/create_base_image.sh | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 nextcloud/containers/base-micro/create_base_image.sh diff --git a/nextcloud/containers/base-micro/create_base_image.sh b/nextcloud/containers/base-micro/create_base_image.sh new file mode 100755 index 0000000..a537c46 --- /dev/null +++ b/nextcloud/containers/base-micro/create_base_image.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +set -o errexit + +source ../create_images.shlib + +if [[ -z $1 ]] || [[ -z $2 ]]; then + echo "Usage: $0 " + exit +fi + +## Build micro image +bootstrap_env "scratch" + +# Install a basic filesystem and minimal set of packages, and microdnf +dnf install -y --disablerepo=* --installroot $MOUNTPOINT --releasever $RELEASEVER \ + $CENTOS_RELEASE_REPOS $CENTOS_RELEASE $CENTOS_GPG + +dnf install -y --installroot $MOUNTPOINT \ + --releasever $RELEASEVER glibc-minimal-langpack --nodocs \ + --setopt install_weak_deps=False + +# Cleanup +clean + +buildah unmount $CONTAINER +# Save the container to an image +buildah commit --squash $CONTAINER "localhost/${IMAGE_NAME}:stream${RELEASEVER}" +