Skip to content

Commit

Permalink
switch to a manual build of pip deps
Browse files Browse the repository at this point in the history
  • Loading branch information
tlex committed Aug 27, 2022
1 parent e3a6638 commit 1b0429f
Showing 1 changed file with 39 additions and 3 deletions.
42 changes: 39 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,47 @@
FROM alpine:latest as builder

COPY cioban/requirements.txt /work/cioban/requirements.txt

ENV CRYPTOGRAPHY_DONT_BUILD_RUST="1"

RUN set -xeu; \
mkdir -p /work/wheels; \
apk add \
python3-dev \
openssl-dev \
gcc \
musl-dev \
libffi-dev \
make \
openssl-dev \
cargo \
; \
python3 -m ensurepip; \
pip3 install -U \
wheel \
pip

RUN pip3 wheel --prefer-binary -r /work/cioban/requirements.txt -w /work/wheels

FROM alpine:latest

LABEL maintainer="[email protected]" \
ai.ix.repository="ix.ai/cioban"

COPY cioban/requirements.txt /cioban/requirements.txt
COPY --from=builder /work /

RUN apk add --no-cache python3 py3-cryptography py3-pip && \
pip3 install --no-cache-dir -r /cioban/requirements.txt
RUN set -xeu; \
ls -lashi /wheels; \
apk add --no-cache python3; \
python3 -m ensurepip; \
pip3 install --no-cache-dir -U pip;\
pip3 install \
--no-index \
--no-cache-dir \
--find-links /wheels \
--requirement /cioban/requirements.txt \
; \
rm -rf /wheels

COPY cioban/ /cioban
COPY cioban.sh /usr/local/bin/cioban.sh
Expand Down

0 comments on commit 1b0429f

Please sign in to comment.