From 3799830a36de9791796d66920ac8fef87d1cbbd8 Mon Sep 17 00:00:00 2001 From: vreusch Date: Fri, 12 Sep 2025 15:18:05 +0200 Subject: [PATCH] add container-based development shell It does not work with the graphical QEMU output but can build all binaries. --- Containerfile | 14 ++++++++++++++ container.sh | 20 ++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 Containerfile create mode 100755 container.sh diff --git a/Containerfile b/Containerfile new file mode 100644 index 00000000..9b61bab0 --- /dev/null +++ b/Containerfile @@ -0,0 +1,14 @@ +FROM debian@sha256:cd50e36013f749a1f86c6369b873e1ad607335480dc4bc2905396ec17ab0ce02 + +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + gcc \ + g++ \ + make \ + flex \ + bison \ + gawk \ + perl \ + dialog \ + libncurses-dev \ + qemu-system-x86 diff --git a/container.sh b/container.sh new file mode 100755 index 00000000..39124e34 --- /dev/null +++ b/container.sh @@ -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