blob: 2f2e10e4f018c058a93a9bb3a6a17ffed3b4f498 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/bash
NAME="mageia32"
VERSION="${1:-8}" # 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}"
|