summaryrefslogtreecommitdiffstats
path: root/redhat/docker/mageia32.sh
diff options
context:
space:
mode:
Diffstat (limited to 'redhat/docker/mageia32.sh')
-rwxr-xr-xredhat/docker/mageia32.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/redhat/docker/mageia32.sh b/redhat/docker/mageia32.sh
new file mode 100755
index 000000000..29afb4b59
--- /dev/null
+++ b/redhat/docker/mageia32.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+NAME="mageia32"
+VERSION="$1" # E.g: '26'
+IMAGE="${NAME}:${VERSION}"
+INSTALLROOT="/dev/shm/${IMAGE}"
+
+sudo rm -rf "${INSTALLROOT}"
+sudo mkdir -p "${INSTALLROOT}"
+setarch i686 sudo urpmi \
+ --root="${INSTALLROOT}" \
+ --auto \
+ bash vim urpmi mageia-release-common
+
+sudo tar -C "${INSTALLROOT}" -c . >"${IMAGE}.tar"
+sudo rm -rf "${INSTALLROOT}"
+
+docker rmi -f "${IMAGE}"
+docker import "${IMAGE}.tar" "${IMAGE}"