Files
Holocore/Dockerfile
Mads Boddum 81d0883446 build: moved jlink build inside the Docker image build, so building the Docker image works on any host OS
Problem was that jlink produces OS-specific artifacts, so you couldn't make a functional Docker image on Windows.
Final Docker image size has also been reduced, roughly from 240MB to 170MB, by using Alpine as the new base image.
Support for Debian Stretch ended on the 30th of June 2022.
2023-08-19 01:23:46 +02:00

24 lines
660 B
Docker

FROM eclipse-temurin:18.0.2.1_1-jdk-alpine AS builder
WORKDIR /holocore
ADD . /holocore
RUN ./gradlew --no-daemon jlink
FROM alpine:3.18.3 AS runner
# Adds necessary Holocore files
RUN mkdir /holocore
COPY --from=builder /holocore/build/holocore/ /holocore
ADD serverdata/ /holocore/serverdata
# Sets up networking
EXPOSE 44463/tcp
# Sets up timezone - default timezone can be overridden by setting TZ environment variable.
RUN apk add --no-cache tzdata
ENV TZ=UTC
# Sets up execution
WORKDIR /holocore
ENTRYPOINT ["/holocore/bin/java", "-m", "holocore/com.projectswg.holocore.ProjectSWG", "--database", "mongodb://pswg_game_database", "--dbName", "cu"]