-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
45 lines (33 loc) · 1.07 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
##########################
## Build env
##########################
FROM python:3.10-buster AS BUILD
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
#RUN apt-get upgrade -y
RUN apt-get install -y --no-install-recommends \
ca-certificates pkg-config make \
libssl-dev libffi-dev libpq-dev
# python packages
RUN pip install --upgrade pip
COPY requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
##########################
## Final image
##########################
FROM python:3.10-buster
LABEL maintainer "CRG System Developers"
LABEL org.label-schema.schema-version="2.0"
LABEL org.label-schema.vcs-url="https://github.com/EGA-archive/beacon-2.x/"
# Too much ?
COPY --from=BUILD /usr/local/bin /usr/local/bin
COPY --from=BUILD /usr/local/lib /usr/local/lib
RUN apt-get update && \
apt update && apt install -y openssh-client sshpass && \
apt-get install -y --no-install-recommends \
nginx \
&& \
rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/nginx.list && \
apt-get purge -y --auto-remove
COPY . .
WORKDIR .