-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (24 loc) · 949 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
# --- BUILD HEALTHCHECK TOOL STAGE ---------------------------------
FROM golang:1.15-alpine AS healthcheck-build
WORKDIR /build
RUN apk add git
RUN git clone https://github.com/evolvedpacks/healthcheck \
--branch master --depth 1 .
RUN go mod download
RUN go build -v -o healthcheck ./cmd/healthcheck/main.go
# --- FINAL IMAGE STAGE --------------------------------------------
FROM openjdk:8-alpine AS final
ENV XMS=1G
ENV XMX=3G
RUN apk add curl git
COPY --from=healthcheck-build /build/healthcheck /bin/healthcheck
# 90 Retries * 10s -> 15 Minutes Startup Time Assumption
HEALTHCHECK --interval=10s --timeout=10s --retries=90 \
CMD /bin/healthcheck -addr localhost:25565 -validateResponse
ENV VERSION=$VERSION
WORKDIR /var/server
COPY ./scripts/entrypoint.sh ./entrypoint.sh
COPY ./banner.txt ./_docker_data/default-banner.txt
COPY ./log4bash-fix.xml ./log4bash-fix.xml
EXPOSE 25565 25575
ENTRYPOINT ["sh", "./entrypoint.sh"]