forked from baking-bad/pytezos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (51 loc) · 1.33 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
ARG POETRY=1.0.5
ARG PENDULUM=2.1.0
ARG PYTEST=5.4
FROM python:3-alpine AS build
ARG POETRY
COPY . /pytezos
RUN apk update \
&& apk --no-cache add --virtual build-deps \
build-base \
libffi-dev \
libressl-dev \
&& pip3 install cryptography==3.3.2 poetry==$POETRY \
&& cd /pytezos && poetry build
FROM python:3-alpine
ARG POETRY
ARG PENDULUM
ARG PYTEST
COPY --from=build /pytezos/dist/*.whl /tmp/pytezos/
RUN apk update \
&& apk --no-cache add --virtual build-deps \
build-base \
autoconf \
automake \
git \
gmp-dev \
isl \
libatomic \
libffi-dev \
libgomp \
libressl-dev \
libtool \
make \
mpfr4 \
mpc1 \
musl-dev \
openssl \
&& apk --no-cache add \
binutils \
libsodium-dev \
&& git clone https://github.com/bitcoin-core/secp256k1.git /tmp/secp256k1 && cd /tmp/secp256k1 \
&& ./autogen.sh \
&& ./configure \
&& make install \
&& cd / && rm -rf /tmp/secp256k1 \
&& pip3 install --no-cache-dir cryptography==3.3.2 poetry==$POETRY pytest~=$PYTEST \
&& pip3 install --no-build-isolation --no-cache-dir pendulum==$PENDULUM \
&& pip3 install --no-cache-dir /tmp/pytezos/*.whl && rm -rf /tmp/pytezos \
&& pip3 uninstall --yes poetry \
&& rm -rf ~/.cache/pip && apk del py-pip \
&& apk del build-deps \
&& rm -f /sbin/apk && rm -rf /etc/apk && rm -rf /lib/apk && rm -rf /usr/share/apk && rm -rf /var/lib/apk