Initial support for container-ized build.

This commit is contained in:
James Pace 2022-10-13 23:32:43 -04:00
parent 6ab810814d
commit 6ff5fc4019
3 changed files with 20 additions and 0 deletions

11
k8s/Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM quay.io/centos/centos:stream9
RUN dnf install -y 'dnf-command(copr)' && \
dnf copr enable -y @osbuild/osbuild && \
dnf install -y osbuild osbuild-tools osbuild-ostree make sudo
RUN useradd -m -G wheel -s /bin/bash -u 1000 j7s && \
bash -c 'echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/container' && \
chmod 0440 /etc/sudoers.d/container
USER j7s

3
k8s/build.sh Executable file
View File

@ -0,0 +1,3 @@
sudo podman build \
-t j7s-os-builder:latest \
-f k8s/Dockerfile .

6
k8s/run.sh Executable file
View File

@ -0,0 +1,6 @@
sudo podman run --rm \
--privileged \
-v $PWD:/project:Z \
-w /project \
localhost/j7s-os-builder:latest \
make cs9-qemu-minimal-ostree.x86_64.repo