forked from debezium/debezium-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ui
42 lines (30 loc) · 1.53 KB
/
Dockerfile.ui
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
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.3 AS builder
ARG JAVA_PACKAGE=java-11-openjdk-headless
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
ENV JAVA_HOME="/usr/lib/jvm/jre-11"
RUN microdnf install ca-certificates ${JAVA_PACKAGE} maven git \
&& microdnf update \
&& microdnf clean all \
&& mkdir -p /javabuild/ui \
&& chown -R 1001 /javabuild \
&& chmod -R "g+rwX" /javabuild \
&& chown -R 1001:root /javabuild \
&& mkdir -p /.cache \
&& chown -R 1001 /.cache \
&& chmod -R "g+rwX" /.cache \
&& chown -R 1001:root /.cache \
&& echo "securerandom.source=file:/dev/urandom" >> /etc/alternatives/jre/lib/security/java.security
USER 1001
COPY --chown=1001:root pom.xml /javabuild/
COPY --chown=1001:root backend/pom.xml /javabuild/backend/pom.xml
COPY --chown=1001:root ui/pom.xml /javabuild/ui/pom.xml
WORKDIR /javabuild
RUN mvn -am -pl ui clean dependency:go-offline -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
COPY --chown=1001:root ui/ /javabuild/ui/
COPY --chown=1001:root .git/ /javabuild/.git/
RUN mvn -am -pl ui package -Dquarkus.package.type=fast-jar -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
FROM nginxinc/nginx-unprivileged:1
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
COPY --from=builder --chown=root:root /javabuild/ui/target/classes/ /usr/share/nginx/html/
COPY --chown=root:root deployment/dbzui-config.sh /docker-entrypoint.d/dbzui-config.sh
COPY --chown=nginx:root ui/config/config.js /usr/share/nginx/html/config.js