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.
20 lines
424 B
20 lines
424 B
6 years ago
|
#!/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}"
|