Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
PengBin9 authored Oct 24, 2024
1 parent 13dc5bd commit ab22bea
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ FROM alpine:3.20.3 AS runner
ARG TARGETARCH

RUN apk update && apk upgrade
RUN apk add --update --no-cache curl jq shadow py3-configobj py3-setuptools python3-dev
COPY ./python /usr/bin/python
RUN apk add --no-cache curl jq shadow gcc patch libffi-dev zlib-dev bzip2-dev openssl-dev ncurses-dev sqlite-dev readline-dev gdbm-dev libpcap-dev xz-dev build-base
RUN wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz && \
tar xf Python-3.8.12.tgz
RUN cd Python-3.8.12 && \
./configure && \
make && make install
RUN ln -s /usr/local/bin/python3 /usr/local/bin/python
RUN curl -s https://bootstrap.pypa.io/get-pip.py -o /get-pip.py && \
chmod 777 /usr/bin/python && \
/usr/bin/python get-pip.py
python get-pip.py
RUN pip install --upgrade --disable-pip-version-check --no-cache-dir --break-system-packages setuptools
RUN --mount=target=/tmp-mount \
cp -a /tmp-mount/output_${TARGETARCH}/* /usr/local && \
Expand Down

0 comments on commit ab22bea

Please sign in to comment.