Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build cgt-calc inside Docker container instead of installing from pipx #563

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,23 @@ 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 -
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about installing poetry using apk instead?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer apk, it's more clear and easier to maintain.

RUN ln -s /root/.local/share/pypoetry/venv/bin/poetry /bin/
COPY . /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"]