mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2025-03-13 00:21:51 +01:00
32 lines
1.4 KiB
Bash
Executable File
32 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script installs podman and qemu-user-static, which is required for the following Dockerfile to work.
|
|
# It omits the error "exec container process `/bin/sh`: Exec format error"
|
|
# The Dockerfile inside THIS directory is used to create two different arches for cross-building of the *.deb and *.rpm files
|
|
# Please note: we need to install these images as root user!
|
|
|
|
sudo apt install podman qemu-user-static
|
|
sudo systemctl daemon-reload
|
|
|
|
pack="fabinfra/debianpackage"
|
|
|
|
arch="arm64/v8"
|
|
echo -e "\n+++++++++++++++++++++++++++++++++++++++++++"
|
|
echo -e "creating local podman container registry $pack. This may take a while ..."
|
|
echo -e "+++++++++++++++++++++++++++++++++++++++++++\n"
|
|
sudo time podman build --platform=linux/${arch} -f Dockerfile -t ${pack}_${arch} #this should get ubuntu:noble
|
|
|
|
arch="arm/v7"
|
|
echo -e "\n+++++++++++++++++++++++++++++++++++++++++++"
|
|
echo -e "creating local podman container registry $pack. This may take a while ..."
|
|
echo -e "+++++++++++++++++++++++++++++++++++++++++++\n"
|
|
sudo time podman build --platform=linux/${arch} -f Dockerfile -t ${pack}_${arch} #this should get alpine:latest
|
|
|
|
echo -e "\n+++++++++++++++++++++++++++++++++++++++++++"
|
|
echo "listing installed images ..."
|
|
echo -e "+++++++++++++++++++++++++++++++++++++++++++\n"
|
|
sudo podman images | grep localhost/fabinfra/
|
|
|
|
# note: unrequired images can be removed again by:
|
|
# sudo su && podman image rm localhost/fabinfra/<name>
|