Skip to content

Commit

Permalink
chore: avoid chown in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgenengelsen committed Aug 26, 2024
1 parent d2f01b8 commit 6f29e30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ EXPOSE 5000

ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH=/code
ENV VIRTUAL_ENV=/code/.venv
ENV PATH="/code/.venv/bin:$PATH"

COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv

COPY pyproject.toml pyproject.toml
COPY uv.lock uv.lock

RUN mkdir -p /.cache/uv && \
chown -R 1000:1000 /.cache/uv/

FROM base as development
RUN uv sync --frozen --no-cache
RUN uv sync --frozen --no-cache --dev
WORKDIR /code/src
COPY src .
USER 1000
Expand Down
2 changes: 1 addition & 1 deletion api/src/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eu

if [ "$1" = 'api' ]; then
uv run ./app.py run
python ./app.py run
else
exec "$@"
fi

0 comments on commit 6f29e30

Please sign in to comment.