docker support for iso build added

This commit is contained in:
Thomas Nahuel Rusiecki 2024-10-26 01:31:10 -03:00 committed by pedro
parent f69082dbc8
commit 58ee9237c8
2 changed files with 45 additions and 0 deletions

17
docker-compose.yaml Normal file
View file

@ -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

28
docker/Dockerfile.build Normal file
View file

@ -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