-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDockerfile.dev
More file actions
37 lines (22 loc) · 810 Bytes
/
Copy pathDockerfile.dev
File metadata and controls
37 lines (22 loc) · 810 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
27
28
29
30
31
32
33
34
35
36
37
# This image generates the keys required for JWT authentication
FROM alpine:3.14 AS keygen
RUN apk add --no-cache openssl
WORKDIR /certs
RUN openssl genrsa -out keypair.pem 2048 && \
openssl rsa -in keypair.pem -pubout -out public.pem && \
openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in keypair.pem -out private.pem
# This is a base image for all maven microservices
FROM maven:3.8.3-openjdk-17 AS maven-base
COPY . /app
WORKDIR /app
# Build all maven modules
RUN mvn clean install -DskipTests
# This image is used to build the payment microservice
FROM python:3.10-slim AS payment
# make sure all messages always reach console
ENV PYTHONUNBUFFERED=1
# prevent writing bytecode
ENV PYTHONDONTWRITEBYTECODE=1
COPY Payment /app
WORKDIR /app
RUN pip install -r requirements.txt