-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (22 loc) · 792 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
FROM openjdk:8-jre-alpine
ARG DEPENDENCY=target/dependency
# Copy the application and all required files
COPY ${DEPENDENCY}/BOOT-INF/lib /app/lib
COPY ${DEPENDENCY}/META-INF /app/META-INF
COPY ${DEPENDENCY}/BOOT-INF/classes /app
COPY default-servers.txt /servers.txt
COPY docker-entrypoint.sh /docker-entrypoint.sh
# Install curl for use in the health check
RUN apk --no-cache add curl
# Create the service user
RUN addgroup -S oise
RUN adduser -S oise -G oise
RUN chmod +x /docker-entrypoint.sh
RUN mkdir /lucene-index
# Update file ownership
RUN chown oise:oise /app /docker-entrypoint.sh /lucene-index /servers.txt
VOLUME [ "/lucene-index" ]
EXPOSE 8080
USER oise
HEALTHCHECK CMD curl --fail http://localhost:8080/actuator/health || exit 1
ENTRYPOINT [ "/docker-entrypoint.sh" ]