ci: Add docker container for functional-tests:stable

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa 2024-10-11 14:22:43 -07:00 committed by Veiko Aasa
parent f5ff0a6cf5
commit 82f4b70999
No known key found for this signature in database
GPG Key ID: 478539CAE680674E

View File

@ -0,0 +1,40 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
FROM debian:stable
CMD /sbin/init
USER root:root
ENV DEBIAN_FRONTEND=noninteractive
RUN echo "deb http://deb.debian.org/debian bookworm-backports main" > /etc/apt/sources.list.d/backports.list; echo "deb-src http://deb.debian.org/debian bookworm-backports main" >> /etc/apt/sources.list.d/backports.list
RUN apt-get update
# Update all packages
RUN apt-get dist-upgrade -y
# Install freedombox package so that plint:plinth user/group are created etc.
RUN apt-get install -y freedombox/bookworm-backports
RUN systemctl mask plinth.service
# Don't ask for the secret in first wizard
RUN rm -f /var/lib/plinth/firstboot-wizard-secret
# Dependencies of the freedombox Debian package
RUN apt-get build-dep -y freedombox/bookworm-backports
# Build and test dependencies
RUN apt-get install -y \
build-essential \
parted \
sshpass \
wget
# Install functional test dependencies
ADD https://salsa.debian.org/freedombox-team/freedombox/-/raw/main/plinth/tests/functional/install.sh /usr/src/install.sh
RUN bash /usr/src/install.sh; rm -f /usr/src/install.sh
# Allow daemons to start when container is started
RUN rm -f /usr/sbin/policy-rc.d