41 lines
1.3 KiB
Docker
41 lines
1.3 KiB
Docker
FROM ubuntu:noble
|
|
|
|
ARG OPENGNSYS_BRANCH=main
|
|
|
|
RUN apt-get update && apt-get -y install \
|
|
debootstrap \
|
|
fdisk \
|
|
file \
|
|
genisoimage \
|
|
git \
|
|
ipxe \
|
|
jq \
|
|
lsof \
|
|
python3 \
|
|
python3-apt \
|
|
qemu-utils \
|
|
rsync \
|
|
schroot \
|
|
squashfs-tools \
|
|
subversion \
|
|
syslinux \
|
|
syslinux-efi \
|
|
syslinux-utils \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN groupadd opengnsys
|
|
RUN mkdir -p /opt/opengnsys/client /tmp/opengnsys/oglive_builder /var/lib/tftpboot/
|
|
RUN ln -fs /var/lib/tftpboot /opt/opengnsys
|
|
|
|
## take stuff from the OG repo: a) cloning engine, b) shared stuff and c) gitrelease
|
|
RUN git clone -c http.sslVerify=false --branch ${OPENGNSYS_BRANCH} https://ognproject.evlt.uma.es/gitea/opengnsys/opengnsys.git /tmp/ogrepo && \
|
|
mv /tmp/ogrepo/client/engine /tmp/ogrepo/client/shared /tmp/opengnsys/ && \
|
|
git --git-dir /tmp/ogrepo/.git log --date format:r%Y%m%d --format=%ad -1 >/tmp/opengnsys/oglive_builder/gitrelease && \
|
|
rm -rf /tmp/ogrepo/
|
|
|
|
#RUN echo 0 ## development: invalidate docker cache at this point, so that the 'COPY' below actually copies files
|
|
COPY . /tmp/opengnsys/oglive_builder/
|
|
RUN cp /tmp/opengnsys/oglive_builder/schroot.conf /tmp/opengnsys/oglive_builder/mount-defaults /etc/schroot/ && echo '' >/etc/schroot/default/nssdatabases && rm -f /etc/schroot/setup.d/*chrootname
|
|
|
|
ENTRYPOINT ["/tmp/opengnsys/oglive_builder/mkoglive.py"]
|