lueschem / edi

Embedded development infrastructure.
https://www.get-edi.io
GNU Lesser General Public License v3.0
40 stars 12 forks source link

Refactor development container workflow e.g. based on Podman #84

Open lueschem opened 1 year ago

lueschem commented 1 year ago

Wish-list

Prototyping

lueschem commented 10 months ago

Rootless container build:

#!/bin/bash

set -o nounset
set -o errexit
set -o pipefail

newcontainer=$(buildah from scratch)
buildah unshare --mount container_root=${newcontainer} bash -c 'mmdebstrap --mode=unshare --include=python3,python3-apt,sudo,netbase,net-tools,iputils-ping,isc-dhcp-client,systemd,systemd-sysv,gnupg,dumb-init --variant=minbase bookworm ${container_root}'

echo ${newcontainer}

Run the container with distrobox:

buildah commit CONTAINER_NAME
distrobox create --image IMAGE_ID --name SOME_CONTAINER_NAME --unshare-all --init