FreedomBox/.ci/Dockerfile.gitlabci
Joseph Nuthalapati a5c8c90eb0
gitlabci: Update Dockerfile and script
Re-heating a server template is a bad idea in the case of Docker images
since they are composed of immutable layers. The size of the image will
keep going up with each subsequent build. Building using debian:testing
instead.

GitLab is no longer allowing docker login with the main password. A
personal access token with the permissions of "api, read_registry,
write_registry" should be used instead.

Avoided copying the massive .container directory into the Docker
container by using a .dockerignore file.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-11-16 18:41:43 -05:00

29 lines
627 B
Docker

# SPDX-License-Identifier: AGPL-3.0-or-later
FROM debian:testing
USER root
COPY . /plinth
WORKDIR /plinth
RUN echo "deb http://deb.debian.org/debian testing main" > /etc/apt/sources.list
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
# Dependencies of the freedombox Debian package
RUN apt-get build-dep -y .
# Build dependencies
RUN apt-get install -y build-essential \
# Test dependencies
sshpass parted \
sudo python3-pip
# Module dependencies
RUN apt-get install -y $(./run --list-dependencies)
# Coverage should know that test_functional.py files are tests
RUN pip3 install splinter pytest-bdd