|
1 | | -FROM python:3.10.12-alpine3.18 as BUILD |
| 1 | +FROM python:3.10.12-slim as BUILD |
2 | 2 |
|
3 | | -RUN apk add --update \ |
4 | | - && apk add --no-cache build-base curl-dev linux-headers bash git musl-dev\ |
5 | | - && apk add --no-cache openssl-dev libffi-dev autoconf bzip2-dev xz-dev\ |
6 | | - && apk add --no-cache python3-dev rust cargo \ |
7 | | - && rm -rf /var/cache/apk/* |
| 3 | +RUN apt-get update \ |
| 4 | + && apt-get install -y build-essential bash git gcc \ |
| 5 | + && apt-get install -y zlib1g-dev liblzma-dev libcurl4-gnutls-dev libssl-dev libffi-dev autoconf libbz2-dev xz-utils \ |
| 6 | + && apt-get install -y python3-dev libdeflate-dev libncurses5-dev libncursesw5-dev libreadline-dev |
8 | 7 |
|
9 | 8 | COPY requirements.txt /root/beacon/requirements.txt |
10 | 9 |
|
11 | 10 | ENV CYTHONIZE=1 |
| 11 | +# the following related to https://github.com/brentp/cyvcf2/issues/240#issuecomment-1534257675 |
| 12 | +ENV LIBDEFLATE=1 |
12 | 13 |
|
13 | | -RUN pip install --upgrade pip && \ |
14 | | - pip install Cython==0.29.26 && \ |
15 | | - pip install -r /root/beacon/requirements.txt |
| 14 | +RUN pip install --upgrade pip \ |
| 15 | + && pip install -r /root/beacon/requirements.txt |
16 | 16 |
|
17 | 17 | COPY setup.py /root/beacon/setup.py |
18 | 18 | COPY beacon_api /root/beacon/beacon_api |
19 | 19 | RUN pip install /root/beacon |
20 | 20 |
|
21 | | -FROM python:3.10.12-alpine3.18 |
| 21 | +FROM python:3.10.12-slim |
22 | 22 |
|
23 | | -RUN apk add --no-cache --update bash |
| 23 | +RUN apt-get install -y bash |
24 | 24 |
|
25 | 25 | LABEL maintainer "CSC Developers" |
26 | 26 | LABEL org.label-schema.schema-version="1.0" |
27 | 27 | LABEL org.label-schema.vcs-url="https://github.com/CSCFI/beacon-python" |
28 | 28 |
|
29 | | -RUN apk add --update \ |
30 | | - && apk add --no-cache curl bzip2 xz |
| 29 | +RUN apt-get update \ |
| 30 | + && apt-get install -y curl bzip2 xz-utils |
31 | 31 |
|
32 | 32 | COPY --from=BUILD usr/local/lib/python3.10/ usr/local/lib/python3.10/ |
33 | 33 |
|
|
0 commit comments