-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathDockerfile
31 lines (25 loc) · 1006 Bytes
/
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
FROM gradle:8.5-jdk17 AS builder
RUN mkdir app
WORKDIR /app
COPY . /app
RUN gradle -x test -x spotlessJava \
-x spotlessCheck -x spotlessJavaCheck \
-x spotbugsMain -x spotbugsTest \
-x pmdMain -x pmdTest \
-x checkstyleMain -x checkstyleTest \
-x violations \
-x reportCoverage \
-x testJar -x testSourcesJar \
-x javadoc -x javadocJar -x testJavadoc -x testJavadocJar \
--no-daemon clean build
FROM sapmachine:17.0.12
# Creates app working directory and a system user (r) with
# no password, no home directory, no shell.
RUN mkdir -p /opt/neonbee/working_dir/config && \
groupadd -r bee && useradd -r -s /bin/false -g bee bee && \
chown -R bee /opt/neonbee
COPY --chown=bee:bee --from=builder /app/build/neonbee-core-*-shadow.jar /opt/neonbee/neonbee-core.jar
COPY --chown=bee:bee --from=builder /app/resources/config /opt/neonbee/
USER bee
ENTRYPOINT ["java","-jar","/opt/neonbee/neonbee-core.jar","-cwd","/opt/neonbee/working_dir"]
CMD ["-port","8080"]