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