-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (19 loc) · 876 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
FROM alpine
# LABEL org.opencontainers.image.authors="[email protected]"
RUN apk add openjdk17-jre
# Define the user to use in this instance to prevent using root that even in a container, can be a security risk.
ENV APPLICATION_USER=vapi_user
# Then add the user, create the /app folder and give permissions to our user.
RUN adduser --disabled-password --gecos '' $APPLICATION_USER
RUN mkdir /app
RUN chown -R $APPLICATION_USER /app
# Mark this container to use the specified $APPLICATION_USER
USER $APPLICATION_USER
COPY ./build/libs/vapi4k-template.jar /app/vapi4k-template.jar
COPY src/main/resources /app/src/main/resources
# Make /app the working directory
WORKDIR /app
EXPOSE 8080
CMD []
# Launch java to execute the jar with defaults intended for containers.
ENTRYPOINT ["java", "-server", "-XX:+UseContainerSupport", "-Xmx2048m", "-jar", "/app/vapi4k-template.jar"]