forked from google/fhir-data-pipes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (38 loc) · 1.78 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
46
47
48
49
50
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This creates a docker image for running the controller web-app. It is expected
# that in real use-cases, the config dir will be mounted to the host machine.
FROM maven:3.8.7-eclipse-temurin-17-focal as build
RUN apt-get update && apt-get install -y nodejs npm
RUN npm cache clean -f && npm install -g n && n stable
WORKDIR /app
COPY ./bunsen ./bunsen
COPY ./pipelines ./pipelines
COPY ./pom.xml ./pom.xml
COPY ./utils ./utils
# Updating license will fail in e2e and there is no point doing it here anyways.
# Note this build can be faster by excluding some uber-jars we don't copy.
RUN mvn --batch-mode clean package -Dlicense.skip=true -DskipTests=true
FROM eclipse-temurin:17-jdk-focal as main
WORKDIR /app
COPY --from=build \
/app/pipelines/controller/target/controller-0.1.0-SNAPSHOT-exec.jar \
./controller.jar
COPY ./docker/config ./config
# Flink will read the flink-conf.yaml file from this directory.
ENV FLINK_CONF_DIR=/app/config
# The -Xmx value is to make sure there is a minimum amount of memory; it can be
# increased if more memory is avaialble and is desired to be used by pipelines.
# Note this is retald to memory config in the above flink-conf.yaml too.
ENTRYPOINT java -Xms6g -Xmx6g -jar /app/controller.jar