This repository was archived by the owner on Oct 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (30 loc) · 1.34 KB
/
Dockerfile
File metadata and controls
48 lines (30 loc) · 1.34 KB
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
FROM python:3.10.12-slim as BUILD
RUN apt-get update \
&& apt-get install -y build-essential bash git gcc \
&& apt-get install -y zlib1g-dev liblzma-dev libcurl4-gnutls-dev libssl-dev libffi-dev autoconf libbz2-dev xz-utils \
&& apt-get install -y python3-dev libdeflate-dev libncurses5-dev libncursesw5-dev libreadline-dev
COPY requirements.txt /root/beacon/requirements.txt
ENV CYTHONIZE=1
# the following related to https://github.com/brentp/cyvcf2/issues/240#issuecomment-1534257675
ENV LIBDEFLATE=1
RUN pip install --upgrade pip \
&& pip install -r /root/beacon/requirements.txt
COPY setup.py /root/beacon/setup.py
COPY beacon_api /root/beacon/beacon_api
RUN pip install /root/beacon
FROM python:3.10.12-slim
RUN apt-get install -y bash
LABEL maintainer "CSC Developers"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.vcs-url="https://github.com/CSCFI/beacon-python"
RUN apt-get update \
&& apt-get install -y curl bzip2 xz-utils
COPY --from=BUILD usr/local/lib/python3.10/ usr/local/lib/python3.10/
COPY --from=BUILD /usr/local/bin/gunicorn /usr/local/bin/
COPY --from=BUILD /usr/local/bin/beacon /usr/local/bin/
COPY --from=BUILD /usr/local/bin/beacon_init /usr/local/bin/
RUN mkdir -p /app
WORKDIR /app
COPY ./deploy/app.sh /app/app.sh
RUN chmod +x /app/app.sh
ENTRYPOINT ["/bin/sh", "-c", "/app/app.sh"]