minecraftimage/Dockerfile

31 lines
462 B
Docker
Raw Normal View History

2021-09-20 09:40:53 +00:00
FROM golang AS builder
WORKDIR /app
COPY ./src /app/src
COPY ./go.mod /app
COPY ./go.sum /app
RUN go build -o /app/main /app/src/main.go
RUN go build -o /app/cmd /app/src/cmd.go
2021-08-25 05:20:14 +00:00
ARG JAVA_VERSION=16
2021-10-27 08:22:01 +00:00
FROM openjdk:8
2020-10-13 08:21:37 +00:00
ENV MIN_MEM=512M
2021-01-02 04:41:39 +00:00
ENV MAX_MEM=1G
2020-10-13 08:21:37 +00:00
ENV STOP="stop"
2021-01-02 04:41:39 +00:00
ENV JAR=server.jar
2021-10-12 10:30:02 +00:00
ENV REGEX=""
2021-01-02 04:41:39 +00:00
2021-09-20 09:40:53 +00:00
COPY --from=builder /app/main /main
COPY --from=builder /app/cmd /usr/local/bin/cmd
2020-10-13 08:21:37 +00:00
EXPOSE 25565
VOLUME [ "/server" ]
2021-09-20 09:40:53 +00:00
WORKDIR /server
2020-10-13 08:21:37 +00:00
ENTRYPOINT [ "/main" ]