Add base image script
This commit is contained in:
parent
4635be11a2
commit
5034999449
1 changed files with 28 additions and 0 deletions
28
nextcloud/containers/base-micro/create_base_image.sh
Executable file
28
nextcloud/containers/base-micro/create_base_image.sh
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/usr/bin/env bash
|
||||
set -o errexit
|
||||
|
||||
source ../create_images.shlib
|
||||
|
||||
if [[ -z $1 ]] || [[ -z $2 ]]; then
|
||||
echo "Usage: $0 <image_name> <release_version>"
|
||||
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}"
|
||||
|
Loading…
Reference in a new issue