forked from IHTSDO/release-validation-framework
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
43 lines (30 loc) · 977 Bytes
/
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
FROM maven:3.6.3-openjdk-17 AS builder
COPY . /usr/src/app
WORKDIR /usr/src/app
RUN mvn clean install -DskipTests=true
FROM adoptopenjdk/openjdk11:alpine
LABEL maintainer="SNOMED International <tooling@snomed.org>"
ARG SUID=1042
ARG SGID=1042
VOLUME /tmp
RUN apk update
RUN apk add git
# Create a working directory
RUN mkdir /app
WORKDIR /app
# Clone in the drools rules needed
RUN git clone https://github.com/IHTSDO/snomed-drools-rules.git
# Clone validation assertions
RUN git clone https://github.com/IHTSDO/snomed-release-validation-assertions.git
RUN mkdir /app/store
RUN mkdir /app/store/releases
# Copy necessary files
COPY --from=builder /usr/src/app/target/release-validation-framework*.jar rvf-api.jar
# Create the rvf user
RUN addgroup -g $SGID rvf && \
adduser -D -u $SUID -G rvf rvf
# Change permissions.
RUN chown -R rvf:rvf /app
# Run as the rvf user.
USER rvf
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","rvf-api.jar"]