-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (18 loc) · 818 Bytes
/
Dockerfile
File metadata and controls
24 lines (18 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM eclipse-temurin:17-jre-jammy
# create non-root user and group
# -l and static IDs assigned to avoid delay in lookups and system logging
ARG THE_USER_ID=1001
ARG THE_GROUP_ID=1001
RUN DEBIAN_FRONTEND=noninteractive && \
/usr/sbin/groupadd -g $THE_GROUP_ID pixolution && \
/usr/sbin/useradd -l -u $THE_USER_ID -G pixolution -g $THE_GROUP_ID pixolution && \
mkdir logs && chgrp pixolution logs && chmod ug+rwx logs
# run as non-root
USER pixolution:pixolution
# main REST service and OpenAPI /swagger-ui/index.html
EXPOSE 8080
# Avoid warning log when starting the server (see https://github.com/google/guice/issues/1133)
#ENV JAVA_OPTS="-Xms512m -Xmx10g -server --add-opens java.base/java.lang=ALL-UNNAMED"
# Copy the sprint boot jar
COPY embeddings-grid.jar app.jar
CMD ["java","-jar","app.jar"]