Skip to content

Commit

Permalink
Fix python installation process on latest alpine (#132)
Browse files Browse the repository at this point in the history
Thank you very much!
  • Loading branch information
weswigham authored Feb 5, 2024
1 parent 84130cc commit a2720d6
Showing 1 changed file with 7 additions and 8 deletions.
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

0 comments on commit a2720d6

Please sign in to comment.