Skip to content

Commit f2ef70f

Browse files
committed
Fix issue with prod permissions
1 parent 171088a commit f2ef70f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ ARG FOLDER=/app
77
ARG PYTHON_VERSION=3.12
88

99
RUN mkdir -p /.cache/uv && chown -R 1000:1000 /.cache
10+
RUN mkdir -p /.local/share/uv/python && chown -R 1000:1000 /.local/share/uv
1011

1112
COPY --chown=1000:1000 . /app
1213
WORKDIR ${FOLDER}
@@ -16,6 +17,8 @@ ENV UV_LINK_MODE=copy
1617
ENV PATH="$FOLDER/.venv/bin:$PATH"
1718
ENV UV_PYTHON=${PYTHON_VERSION}
1819

20+
USER 1000:1000
21+
1922
RUN uv python install ${PYTHON_VERSION} && \
2023
uv venv .venv && \
2124
if [ -f pyproject.toml ]; then \
@@ -24,6 +27,4 @@ RUN uv python install ${PYTHON_VERSION} && \
2427
uv pip install -r requirements.txt; \
2528
fi
2629

27-
USER 1000:1000
28-
2930
CMD ["uv", "run", "--with", "uvicorn", "uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000", "--proxy-headers"]

0 commit comments

Comments
 (0)