-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (21 loc) · 817 Bytes
/
Dockerfile
File metadata and controls
26 lines (21 loc) · 817 Bytes
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
FROM openjdk:11.0.8-jre-buster as builder
WORKDIR /build/
COPY . /build/
RUN /build/generate.sh
FROM python:3.10.4-alpine3.15
WORKDIR /app
ENTRYPOINT ["python3"]
CMD ["-m", "opera.api.cli"]
COPY requirements.txt /app/
COPY requirements-dev.txt /app/
RUN export CRYPTOGRAPHY_PREREQS="gcc musl-dev libffi-dev openssl-dev python3-dev" \
&& export PIP_PREREQS="git" \
&& apk add $CRYPTOGRAPHY_PREREQS $PIP_PREREQS \
&& pip3 install --upgrade pip \
&& pip3 install --no-cache-dir cryptography==3.3.2 \
&& pip3 install --no-cache-dir wheel \
&& pip3 install --no-cache-dir -r requirements.txt \
&& pip3 install --no-cache-dir -r requirements-dev.txt \
&& apk del $CRYPTOGRAPHY_PREREQS $PIP_PREREQS \
&& rm requirements.txt requirements-dev.txt
COPY --from=builder /build/src/ /app/