dummy/Dockerfile

32 lines
465 B
Docker
Raw Normal View History

2021-11-26 22:44:19 +00:00
ARG VERSION=17
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-11-26 22:44:19 +00:00
FROM openjdk:$VERSION
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" ]