forked from alphagov/verify-proxy-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (23 loc) · 751 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (23 loc) · 751 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
# Base builder image
FROM gradle:jdk11 AS build
WORKDIR /app
USER root
ENV GRADLE_USER_HOME ~/.gradle
COPY build.gradle build.gradle
COPY settings.gradle settings.gradle
COPY proxy-node-shared/ proxy-node-shared/
ARG component=proxy-node-gateway
COPY ${component}/src ${component}/src
COPY ${component}/build.gradle ${component}/build.gradle
RUN gradle --no-daemon --quiet -p ${component} --parallel install -x test
ENTRYPOINT ["gradle", "--no-daemon"]
FROM openjdk:11-jre-slim
WORKDIR /app
USER root
ARG component
COPY --from=build /app/${component}/build/install/${component} /app
RUN apt-get update && apt-get install -y dumb-init
ENV CONFIG_FILE config.yml
ENV COMPONENT $component
ENTRYPOINT ["dumb-init", "--"]
CMD "/app/bin/$COMPONENT"