From 2a0d5db355f202966b258558cfe0b96a0b05052c Mon Sep 17 00:00:00 2001 From: Thomas Rusiecki Date: Sat, 26 Oct 2024 01:31:10 -0300 Subject: [PATCH] docker support for iso build added --- docker-compose.yaml | 17 +++++++++++++++++ docker/Dockerfile.build | 28 ++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 docker-compose.yaml create mode 100644 docker/Dockerfile.build diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..e4cb34a --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,17 @@ + +services: + build-iso: + build: + context: . + dockerfile: docker/Dockerfile.build + #this is needed for mount + privileged: true + volumes: + - type: bind + source: . + target: /var/opt + read_only: true + - type: bind + source: ./iso + target: /var/opt/iso + read_only: false diff --git a/docker/Dockerfile.build b/docker/Dockerfile.build new file mode 100644 index 0000000..921e31e --- /dev/null +++ b/docker/Dockerfile.build @@ -0,0 +1,28 @@ +FROM debian:bookworm-slim + +# Install dependencies +RUN apt-get update && apt-get install -y \ + smartmontools \ + lshw \ + hwinfo \ + dmidecode \ + python3 \ + pipenv \ + sudo \ + debootstrap \ + && rm -rf /var/lib/apt/lists/* + + +WORKDIR /var/opt + +#allow sudo so that deploy-workbench.sh runs +RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo +RUN echo "docker ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + +RUN chown -R docker /var/opt/iso + +ENV USER=docker +USER docker + +COPY ./deploy-workbench.sh ./ +ENTRYPOINT sh deploy-workbench.sh