Skip to content

Commit

Permalink
Build cgt-calc inside Docker container instead of installing from pipx
Browse files Browse the repository at this point in the history
  • Loading branch information
srv-meta committed Sep 28, 2024
1 parent 8041bcb commit 7328cde
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,26 @@ RUN apk --no-cache add \
texmf-dist-latexextra \
texmf-dist-pictures \
texmf-dist-science \
wget
wget \
curl \
git


RUN luaotfload-tool --update
RUN apk --no-cache add py3-pandas
RUN apk --no-cache add pipx
RUN pipx install cgt-calc
RUN pipx ensurepath

WORKDIR /data
WORKDIR /build

RUN curl -sSL https://install.python-poetry.org | python3 -
RUN ln -s /root/.local/share/pypoetry/venv/bin/poetry /bin/
COPY cgt_calc /build/cgt_calc
COPY .git /build/.git
COPY .github /build/.github
COPY pyproject.toml README.md .editorconfig .gitignore .kodiak.toml .pre-commit-config.yaml /build/
RUN /bin/poetry build
RUN /bin/poetry install
RUN echo "/bin/poetry -C /build run cgt-calc \$@" > /bin/cgt-calc
RUN chmod +x /bin/cgt-calc

WORKDIR /data
ENTRYPOINT ["/bin/bash"]

0 comments on commit 7328cde

Please sign in to comment.