-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (21 loc) · 815 Bytes
/
Dockerfile
File metadata and controls
21 lines (21 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM openjdk:8u151-jre-alpine
MAINTAINER Maksim Kostromin https://github.com/daggerok
RUN apk --no-cache add busybox-suid bash curl sudo \
&& adduser -h /home/appuser -s /bin/bash -D -u 1025 appuser wheel \
&& echo "appuser ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers \
&& sed -i "s/.*requiretty$/Defaults !requiretty/" /etc/sudoers \
&& apk del busybox-suid \
&& rm -rf /tmp/* /var/cache/apk/*
USER appuser
WORKDIR /home/appuser
VOLUME /home/appuser
ENTRYPOINT java -XX:+UnlockExperimentalVMOptions \
-XX:+UseCGroupMemoryLimitForHeap \
-XshowSettings:vm \
-jar ./app.jar
CMD /bin/bash
EXPOSE 8080
HEALTHCHECK --timeout=2s \
--retries=22 \
CMD curl -f http://127.0.0.1:8080/health || exit 1
COPY --chown=appuser ./build/libs/*.jar ./app.jar