container: add password and wheel group membership
This commit is contained in:
+13
-4
@@ -2,9 +2,11 @@ REPO="gitea.wefers.page/julian/backup-server"
|
||||
TAG="latest"
|
||||
|
||||
build() {
|
||||
read -srp "Desired password for user 'backup' in resulting container image: " password
|
||||
# ABSOLUTELY DO NOT USE --squash, as ostree NEEDS the layers
|
||||
buildah build \
|
||||
-t ${REPO}:${TAG} \
|
||||
--build-arg PASSWORD="${password}" \
|
||||
--pull \
|
||||
--layers \
|
||||
--format oci \
|
||||
@@ -13,28 +15,35 @@ build() {
|
||||
if [ $? -eq 0 ]; then
|
||||
buildah login gitea.wefers.page -u julian -p 278b81490079574229dce45b66b726d2ae7e83c0
|
||||
buildah push \
|
||||
--compression-format zstd \
|
||||
--compression-format zstd:chunked \
|
||||
"${REPO}:${TAG}"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
mkImage() {
|
||||
sudo podman run \
|
||||
# set -euo
|
||||
# echo "current partitions:"
|
||||
# lsblk
|
||||
# read -p "target USB stick device to write image to: /dev/" dev
|
||||
podman run \
|
||||
--rm \
|
||||
-it \
|
||||
--privileged \
|
||||
--pull=newer \
|
||||
--network=host \
|
||||
--security-opt label=type:unconfined_t \
|
||||
-v ./config.toml:/config.toml:ro \
|
||||
-v ./output:/output \
|
||||
-v /etc/containers/storage.conf:/etc/containers/storage.conf \
|
||||
-v /var/lib/containers/storage:/var/lib/containers/storage \
|
||||
-v ~/.local/share/containers/storage:/var/lib/containers/storage \
|
||||
quay.io/centos-bootc/bootc-image-builder:latest \
|
||||
--in-vm \
|
||||
--type anaconda-iso \
|
||||
--use-librepo=True \
|
||||
--rootfs ex4 \
|
||||
${REPO}:${TAG}
|
||||
|
||||
# sudo dd if=output/bootiso/install.iso of=/dev/${dev} bs=4M
|
||||
}
|
||||
|
||||
$1
|
||||
|
||||
Reference in New Issue
Block a user