-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile.native
57 lines (40 loc) · 1.37 KB
/
Dockerfile.native
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
51
52
53
54
55
56
57
FROM quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-17 AS builder
USER root
RUN microdnf update -y \
&& microdnf install -y nodejs \
&& microdnf clean all
USER quarkus
WORKDIR /workspace
COPY --chown=quarkus:quarkus pom.xml .
COPY --chown=quarkus:quarkus mvnw .
COPY --chown=quarkus:quarkus .mvn .mvn
RUN ./mvnw dependency:copy-dependencies
COPY --chown=quarkus:quarkus src src
RUN ./mvnw package -Dnative
FROM frolvlad/alpine-glibc:alpine-3.14_glibc-2.33
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
ENV PATH=$PATH:/home/node/.npm-global/bin
ENV PATH=$PATH:/home/node/.npm-global/lib
ENV NODE_ENV=production
RUN addgroup -g 1000 node \
&& adduser -u 1000 -G node -s /bin/sh -D node \
&& apk add --no-cache \
curl \
nodejs \
npm \
openjdk11
USER node
WORKDIR /home/node/
RUN curl -sSL https://raw.githubusercontent.com/liferay/liferay-blade-cli/master/cli/installers/local | sh
ENV PATH "$PATH:/home/node/jpm/bin"
RUN blade update && \
blade version
RUN npm i -g yarn \
&& yarn global add yo@3.1.0
RUN yarn global add generator-old-liferay-theme@npm:generator-liferay-theme@^8.0.0 \
&& yarn global add generator-liferay-theme@10.1.0 \
&& yarn global add generator-liferay-js
COPY --from=builder /workspace/target/*-runner /usr/bin/liferay-starter
USER node
EXPOSE 8080
CMD ["/usr/bin/liferay-starter", "-Dquarkus.http.host=0.0.0.0"]