Skip to content

Commit

Permalink
ci: fixup and streamline apk poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
Borketh committed Sep 30, 2024
1 parent 3c3093e commit b9216cc
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,19 @@ FROM python:3.12-alpine AS build

WORKDIR /deps

RUN pip --no-cache-dir install --progress-bar=off "poetry==1.8"
#RUN pip --no-cache-dir install --progress-bar=off "poetry==1.8"
RUN apk update
RUN apk add g++ git re2-dev
COPY pyproject.toml .
COPY poetry.lock .
RUN poetry install -nvvv --only main --no-root --compile
RUN apk add g++ git re2-dev poetry python3-dev
COPY pyproject.toml poetry.lock poetry.toml ./
RUN poetry env use $(which python) # needed because installing through apk makes path not work
RUN poetry install -nvvv --no-root --compile --only main
COPY fred ./fred/
RUN poetry install -nvvv --only-root --compile
RUN mv $(poetry env info --path) ./venv

FROM runtime

COPY --from=build /deps/venv ./venv
COPY --from=build /deps/.venv ./venv
COPY fred ./fred/
COPY *.env .

CMD ./venv/bin/python3 -m fred
RUN pwd
CMD ./venv/bin/python -m fred

Check warning on line 34 in docker/Dockerfile

View workflow job for this annotation

GitHub Actions / build-and-push

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/

0 comments on commit b9216cc

Please sign in to comment.