-
Notifications
You must be signed in to change notification settings - Fork 54
/
Dockerfile.arm64
31 lines (30 loc) · 1.1 KB
/
Dockerfile.arm64
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
FROM arm64v8/openjdk:8-jdk-slim AS build
WORKDIR /usr/local/src/nukkit
COPY src /usr/local/src/nukkit/src
COPY gradlew *.gradle.kts .gitmodules /src/
COPY src /src/src
COPY .git /src/.git
COPY gradle /src/gradle
RUN git submodule update --init && \
./gradlew shadowJar
FROM arm64v8/openjdk:8-jre-slim AS run
LABEL maintainer="Chris Fordham <[email protected]>"
COPY --from=build /usr/local/src/nukkit/target/nukkit-1.0-SNAPSHOT.jar /opt/nukkit/nukkit.jar
COPY nukkit.yml.default /etc/opt/nukkit/nukkit.yml
RUN useradd --user-group \
--no-create-home \
--home-dir /var/opt/nukkit \
--shell /usr/sbin/nologin \
minecraft && \
mkdir -p /var/opt/nukkit && \
chown -R minecraft /opt/nukkit /var/opt/nukkit /etc/opt/nukkit/nukkit.yml && \
ln -sfv /etc/opt/nukkit/nukkit.yml /var/opt/nukkit/nukkit.yml && \
apt-get -y update && \
apt-get -y install lsof && \
rm -rf /var/lib/apt/lists/*
USER minecraft
VOLUME /etc/opt/nukkit /var/opt/nukkit /opt/nukkit
EXPOSE 19132
WORKDIR /var/opt/nukkit
ENTRYPOINT ["java"]
CMD [ "-jar", "/opt/nukkit/nukkit.jar" ]