From 2c396b4199ed3208dc03054a6172ed98aa44f114 Mon Sep 17 00:00:00 2001 From: Peter Jung Date: Fri, 13 Sep 2024 15:29:09 +0200 Subject: [PATCH] Fix appuser (#12) --- Dockerfile | 2 -- Makefile | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4950f15..d08ecb9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,8 +21,6 @@ RUN apt-get update && apt-get install -y postgresql RUN useradd -m appuser -USER appuser - ENV VIRTUAL_ENV=/app/.venv \ PATH="/app/.venv/bin:$PATH" diff --git a/Makefile b/Makefile index 41310c1..fcd7958 100644 --- a/Makefile +++ b/Makefile @@ -10,4 +10,5 @@ push: docker push $(IMAGE_NAME) tests-docker: build - docker run --env-file .env --rm $(IMAGE_NAME) pytest tests + # Run as appuser because Postgres won't allow execution as root at any costs. + docker run --env-file .env --rm --user appuser $(IMAGE_NAME) pytest tests