Skip to content

Commit

Permalink
fix: Update Dockerfile to address security issues
Browse files Browse the repository at this point in the history
  • Loading branch information
wktls63 committed Oct 4, 2024
1 parent 5c89558 commit aca80ad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions services/content-service/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Base image
FROM python:3.10

# Create a non-root user and set permissions
RUN useradd -m appuser

# Set the working directory
WORKDIR /app

Expand All @@ -16,5 +19,8 @@ COPY alembic.ini .
# Expose the port for content-service (8000)
EXPOSE 8000

# Switch to the non-root user
USER appuser

# Run the app using uvicorn
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]

0 comments on commit aca80ad

Please sign in to comment.