From af2c05a880fe4d3535728b4bae3b50858674d519 Mon Sep 17 00:00:00 2001 From: Morten Brekkevold Date: Thu, 29 Feb 2024 17:01:32 +0000 Subject: [PATCH] Add sudo to tests/docker This makes sudo available in the Docker-based test environment, in order to make the environment slightly more similar to GitHub Actions (which doesn't feature gosu). With sudo it is easier to locally reproduce sudo-related problems observed on GitHub actions. --- tests/docker/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index 2a97f4a76c..72ce24712a 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -10,9 +10,12 @@ ENV DEBIAN_FRONTEND noninteractive ### Installing packages RUN sed -ie 's/^# *deb-src/deb-src/' /etc/apt/sources.list # Enable source repos RUN apt-get update && \ - apt-get install -y software-properties-common gosu && \ + apt-get install -y software-properties-common gosu sudo && \ chmod u+s /usr/sbin/gosu +RUN echo "build ALL =(ALL: ALL) NOPASSWD: ALL" > /etc/sudoers.d/navbuild + + RUN add-apt-repository ppa:deadsnakes/ppa && \ apt-get update && \ apt-get -y install --no-install-recommends \