-
Notifications
You must be signed in to change notification settings - Fork 6k
/
Copy pathDockerfile
46 lines (41 loc) · 1.43 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
FROM redhat/ubi9-minimal:9.2
RUN microdnf -y install shadow-utils
RUN microdnf -y install which
RUN microdnf -y install glibc-langpack-en
RUN microdnf -y install tar
RUN microdnf -y install gzip
ENV disableOas31Resolve=False
ENV JAVA_HOME=/opt/java/openjdk
COPY --from=eclipse-temurin:17-jre $JAVA_HOME $JAVA_HOME
ENV PATH="${JAVA_HOME}/bin:${PATH}"
COPY docker/environment /etc/environment
WORKDIR /jetty_home
COPY docker/jetty /jetty_home/
COPY target/lib/jetty* /jetty_home/lib/
RUN mkdir /jetty_home/lib/shared
RUN chgrp -R 0 /jetty_home/lib/shared && \
chmod -R g=u /jetty_home/lib/shared
RUN rm /jetty_home/lib/jetty-runner*
COPY target/lib/javax.servlet-api* /jetty_home/lib/servlet-api-3.1.jar
COPY target/lib/start.jar /jetty_home/
ENV JETTY_HOME /jetty_home
WORKDIR /generator
COPY docker/jetty_base /generator/
COPY docker/ROOT.xml /generator/webapps/ROOT.xml
COPY target/*.war /generator/webapps/ROOT.war
COPY grantall.policy /generator/grantall.policy
ENV JETTY_BASE /generator
ARG HIDDEN_OPTIONS_DEFAULT_PATH
COPY ${HIDDEN_OPTIONS_DEFAULT_PATH} /generator/resources/
ARG HTTP_PORT
ENV HTTP_PORT ${HTTP_PORT}
ARG JAVA_MEM
ENV JAVA_MEM ${JAVA_MEM}
ENV EXIT_ON_OUTOFMEMORYERROR ""
WORKDIR $JETTY_BASE
RUN groupadd --gid 2000 codegengroup
RUN useradd --home "/generator" --gid codegengroup --shell "/bin/bash" --uid "1000" codegenuser
RUN chown -R codegenuser /generator
RUN chown -R codegenuser /jetty_home
USER codegenuser
CMD ["./start"]