Skip to content
Snippets Groups Projects
Commit 7d640ee6 authored by Shane Hutchins's avatar Shane Hutchins
Browse files

AWS image update

parent 9c4ac38f
No related branches found
No related tags found
1 merge request!482Security, refactor and code cleanup
Pipeline #254219 failed
# This Dockerfile assumes you used "make build" to convert the AdminUI to static files in frontend/adminui/dist/policyservice
FROM python:3.9-slim-buster
# Run as user
RUN adduser --system --group nonroot
USER nonroot
# set environment variables
# PYTHONDONTWRITEBYTECODE - Prevents Python from writing pyc files to disc (equivalent to python -B option)
ENV PYTHONDONTWRITEBYTECODE 1
......@@ -16,8 +12,8 @@ WORKDIR /opt
COPY ./app /opt
RUN pip install --no-cache-dir --upgrade -r /opt/requirements.txt
# Admin UI
# Disabling until build passes
# COPY ./frontend/adminui/dist/policyservice /opt/assets
# Run as user
RUN adduser --system --group nonroot
USER nonroot
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080", "--workers", "4", "--proxy-headers"]
......@@ -40,7 +40,8 @@ RUN apk del gcc musl-dev linux-headers python3-dev
RUN apk --purge del apk-tools
# Run as user
RUN adduser -D nonroot -G nonroot
RUN addgroup -S nonroot \
&& adduser -D nonroot -G nonroot
USER nonroot
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--workers", "4", "--port", "8080", "--proxy-headers"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment