diff options
Diffstat (limited to 'redhat/docker/openmandriva.sh')
-rwxr-xr-x | redhat/docker/openmandriva.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/redhat/docker/openmandriva.sh b/redhat/docker/openmandriva.sh new file mode 100755 index 000000000..ff121c54e --- /dev/null +++ b/redhat/docker/openmandriva.sh @@ -0,0 +1,27 @@ +#!/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}" |