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

Dockerfile: Fix python installation process on latest alpine #132

Merged
merged 1 commit into from
Feb 5, 2024
Merged
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
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ RUN apk --no-cache add --virtual build_dependencies \
git \
libgcc \
libstdc++ && \
apk --no-cache add python3 && \
if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python ; fi && \
python3 -m ensurepip && \
python3 -m pip install --upgrade pip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --no-cache --upgrade pip setuptools wheel && \
if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
pip3 install --no-cache-dir -r bloodytools/requirements.txt
apk add --no-cache python3 py3-pip && \
python3 -m venv /app/.venv && \
. /app/.venv/bin/activate && \
pip3 install --no-cache-dir -r /app/bloodytools/requirements.txt

# Enable python venv in entrypoint
ENV PATH="/app/.venv/bin:$PATH"

## set bloodytools entrypoint, this container will be usable like a command line tool
COPY . /app/bloodytools
Expand Down