2025-03-11 01:41:48 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2025-03-11 03:02:58 +01:00
|
|
|
# We install some required libraries for building/compiling
|
2025-03-11 01:41:48 +01:00
|
|
|
# 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
|
|
|
|
|
2025-03-11 03:02:58 +01:00
|
|
|
sudo apt install podman gsasl libgsasl7-dev libssl-dev libclang-dev cmake clang capnproto mosquitto mosquitto-clients devscripts build-essential debhelper debtags alien libpcsclite-dev qemu-user-static
|
|
|
|
|
2025-03-11 01:41:48 +01:00
|
|
|
sudo systemctl daemon-reload
|
|
|
|
|
2025-03-11 03:02:58 +01:00
|
|
|
# Please note: we need to install these images as root user!
|
2025-03-11 01:41:48 +01:00
|
|
|
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>
|