FreedomBox/.ci/Containerfile.functional-tests-stable
Sunil Mohan Adapa 82f4b70999
ci: Add docker container for functional-tests:stable
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-15 18:56:33 +03:00

41 lines
1.2 KiB
Plaintext

# 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