Skip to content

Commit

Permalink
Create user at last minute in dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Sargent committed Feb 13, 2024
1 parent 97713a1 commit 988cc8e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ ENV PYTHONUNBUFFERED=1
# Set the working directory in the container
WORKDIR /code

# Create a non-root user and switch to it
RUN adduser -D appuser
USER appuser

# Install Poetry
# Note: Consider locking the Poetry version for consistent builds
ENV POETRY_VERSION=1.7
Expand All @@ -35,5 +31,10 @@ COPY . /code/

HEALTHCHECK CMD curl --fail http://localhost:8000/ || exit 1

# Create a non-root user and switch to it
RUN adduser --disabled-password appuser
USER appuser


# Use a script as the entrypoint
ENTRYPOINT ["/code/entrypoint.sh"]

0 comments on commit 988cc8e

Please sign in to comment.