add container-based development shell

It does not work with the graphical QEMU output but can build all
binaries.
This commit is contained in:
2025-09-12 15:18:05 +02:00
parent 34e39dc2b6
commit 3799830a36
2 changed files with 34 additions and 0 deletions

20
container.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env sh
# Run a shell inside of the container-based development environment.
#
# However, to see and use the QEMU UI, you need to run QEMU outside of the container.
set -eu
cd "$(dirname "$0")"
if podman --version; then
cmd=podman
else
cmd=docker
fi
"$cmd" build --tag=moslab .
"$cmd" create --interactive --tty --name=moslab --volume="$(pwd)":"$(pwd)" \
--workdir="$(pwd)" moslab bash || true
"$cmd" start --attach --interactive moslab