mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
- This means that systemd sandbox will be in effect even during development. We won't miss out on bugs in sandbox configuration. - We won't have disable systemd sandbox features just because we can test properly on development setup. Such as JoinsNamespaceOf=. - This also leads to significant reduction in hacky code for setting up for development and functional tests. - One disadvantage is that first setup is run before user gets a chance to interact with the started container/VM. However, this is okay since first setup can be re-run easily by removing the /var/lib/plinth/plinth.sqlite3 file and also the need for doing this is rare. Tests: - Start a fresh container and run functional tests with './container run-tests' on it. The tests run as expected (succeed or fail). - While first setup is in progress, running the command 'make wait-while-first-setup' waits while printing dots. After the first setup is done, it exists. - Running the command freedombox-logs shows FreedomBox logs for both the web and privileged services. - Changing a source code file in the /freedombox directory (or on the host) leads to a restart of the Plinth web service. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
41 lines
1.2 KiB
Plaintext
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 trixie-backports main" > /etc/apt/sources.list.d/backports.list; echo "deb-src http://deb.debian.org/debian trixie-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/trixie-backports
|
|
RUN systemctl disable 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/trixie-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
|