-
Notifications
You must be signed in to change notification settings - Fork 63
/
Dockerfile
47 lines (39 loc) · 899 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# -----------------------------------------------------------------------------
#
# Note this Dockerfile is an skeleton that you can use as a starting point for
# your own Dockerfile. It is NOT intended to be used for production workloads.
#
# -----------------------------------------------------------------------------
#
# Microsoft OpenJDK 11
#
FROM mcr.microsoft.com/openjdk/jdk:17-ubuntu
#
# Create quarkus user
#
RUN groupadd -r helloworldjob && \
useradd -r -g helloworldjob helloworldjob
#
# Create helloworldjob directory
#
RUN mkdir -p /opt/helloworldjob
#
# Expose port 8080.
#
EXPOSE 8080
#
# Copy the JAR file.
#
COPY target/helloworldjob.jar /opt/helloworldjob/helloworldjob.jar
#
# Set file ownership
#
RUN chown -R helloworldjob /opt/helloworldjob
#
# Change user
#
USER helloworldjob
#
# Startup command.
#
CMD ["java", "-jar", "/opt/helloworldjob/helloworldjob.jar"]