You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tde-packaging/redhat/docker/openmandriva.sh

28 lines
748 B

#!/bin/bash -ex
NAME="openmandriva"
VERSION="${1:-5.0}" # E.g: '26'
IMAGE="${NAME}:${VERSION}"
TAR="${NAME}-${VERSION}.tar"
INSTALLROOT="/dev/shm/${IMAGE}"
sudo rm -rf "${INSTALLROOT}"
sudo dnf install \
--assumeyes \
--disablerepo="*" \
--enablerepo="omv*" \
--installroot="${INSTALLROOT}" \
--nodocs \
--nogpgcheck \
--refresh \
--releasever="${VERSION}" \
--repofrompath 'omv-release,http://mirror.openmandriva.org/$releasever/repository/x86_64/main/release/' \
--repofrompath 'omv-updates,http://mirror.openmandriva.org/$releasever/repository/x86_64/main/updates/' \
bash curl dnf vim
sudo tar -C "${INSTALLROOT}" -c . >"${TAR}"
sudo rm -rf "${INSTALLROOT}"
docker rmi -f "${IMAGE}"
docker import "${TAR}" "${IMAGE}"