Skip to content

Commit

Permalink
Fix problems that showed up in OpenShift testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ssorj committed Feb 7, 2024
1 parent 1b8d1e7 commit 20614d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
13 changes: 5 additions & 8 deletions backend/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,16 @@

FROM python:alpine AS build

RUN addgroup -S fritz && adduser -S fritz -G fritz
USER fritz

RUN pip install --user --no-cache-dir starlette uvicorn

COPY --chown=fritz:fritz python /home/fritz/python
RUN pip install --no-cache-dir starlette uvicorn

FROM python:alpine AS run

RUN addgroup -S fritz && adduser -S fritz -G fritz
RUN adduser -S fritz -G root
USER fritz

COPY --chown=fritz:fritz --from=build /home/fritz /home/fritz
COPY --from=build /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
COPY python /home/fritz/python

EXPOSE 8080
WORKDIR /home/fritz
ENTRYPOINT ["python", "python/main.py"]
15 changes: 6 additions & 9 deletions frontend/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,17 @@

FROM python:alpine AS build

RUN addgroup -S fritz && adduser -S fritz -G fritz
USER fritz

RUN pip install --user --no-cache-dir httpx starlette sse_starlette uvicorn

COPY --chown=fritz:fritz python /home/fritz/python
COPY --chown=fritz:fritz static /home/fritz/static
RUN pip install --no-cache-dir httpx starlette sse_starlette uvicorn

FROM python:alpine AS run

RUN addgroup -S fritz && adduser -S fritz -G fritz
RUN adduser -S fritz -G root
USER fritz

COPY --chown=fritz:fritz --from=build /home/fritz /home/fritz
COPY --from=build /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
COPY python /home/fritz/python
COPY static /home/fritz/static

EXPOSE 8080
WORKDIR /home/fritz
ENTRYPOINT ["python", "python/main.py"]

0 comments on commit 20614d0

Please sign in to comment.