From 50b20eee8c475a198b1fafda31f4a5dd61f48b69 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Tue, 21 Feb 2023 09:43:41 -0600 Subject: [PATCH] Add start-container.sh script This will make it easier to manually create a container for development and debugging. --- podman-build.sh | 18 +----------------- start-container.sh | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 17 deletions(-) create mode 100755 start-container.sh diff --git a/podman-build.sh b/podman-build.sh index f91a71d..0761fe1 100755 --- a/podman-build.sh +++ b/podman-build.sh @@ -3,23 +3,7 @@ set -e -. ./config - -cid=$(podman run \ - --tmpfs /var/tmp \ - --tmpfs /usr/${target}/tmp \ - -v portage:/var/db/repos/gentoo \ - -v packages:/var/cache/binpkgs \ - -v distfiles:/var/cache/distfiles \ - -v packages:/usr/${target}/var/cache/binpkgs \ - -v /mnt/gentoo \ - -v ${PWD}:/tmp/build:rw,z \ - -w /tmp/build \ - -d \ - -e FEATURES='-ipc-sandbox -network-sandbox -pid-sandbox' \ - cross-${target} \ - python -c 'from signal import *;signal(SIGTERM, lambda x, y: None);pause()' -) +cid=$(./start-container.sh) ./patch-uboot.sh diff --git a/start-container.sh b/start-container.sh new file mode 100755 index 0000000..25279b9 --- /dev/null +++ b/start-container.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# vim: set sw=4 ts=4 sts=4 et : + +set -e + +. ./config + +podman run \ + --tmpfs /var/tmp \ + --tmpfs /usr/${target}/tmp \ + -v portage:/var/db/repos/gentoo \ + -v packages:/var/cache/binpkgs \ + -v distfiles:/var/cache/distfiles \ + -v packages:/usr/${target}/var/cache/binpkgs \ + -v /mnt/gentoo \ + -v ${PWD}:/tmp/build:rw,z \ + -w /tmp/build \ + -d \ + -e FEATURES='-ipc-sandbox -network-sandbox -pid-sandbox' \ + cross-${target} \ + python -c 'from signal import *;signal(SIGTERM, lambda x, y: None);pause()'