|
1 |
| -FROM eclipse-temurin:17-jre-jammy |
| 1 | +FROM eclipse-temurin:17-jre-jammy AS builder |
2 | 2 | RUN apt-get -qq update && apt-get -qq install -y unzip jq
|
3 | 3 |
|
4 | 4 | RUN curl -fsSL -o "/tmp/rcon.tar.gz" $(curl -s https://api.github.com/repos/gorcon/rcon-cli/releases/latest | jq -r '.assets | map(select(.name | test("amd64_linux")))[0].browser_download_url')
|
5 | 5 | RUN mkdir /tmp/rcon
|
6 | 6 | RUN tar -xf /tmp/rcon.tar.gz -C /tmp/rcon --strip-components=1
|
7 |
| -RUN install -m 755 /tmp/rcon/rcon /usr/local/bin/rcon-cli |
8 |
| -RUN install -m 644 /tmp/rcon/rcon.yaml /etc/rcon.yaml |
9 |
| -COPY --chmod=755 rcon /usr/local/bin/rcon |
10 |
| -RUN rm -r /tmp/rcon.tar.gz /tmp/rcon |
11 | 7 |
|
12 |
| -RUN mkdir /data |
13 | 8 | WORKDIR /data
|
14 | 9 | RUN curl -fsSL -o "/tmp/pack.zip" "https://www.curseforge.com/api/v1/mods/681792/files/5795941/download"
|
15 | 10 | RUN curl -fsSL -o "/tmp/old.zip" "https://www.curseforge.com/api/v1/mods/681792/files/4496671/download"
|
16 |
| -RUN unzip -q /tmp/pack.zip |
| 11 | +RUN unzip -q /tmp/pack.zip -d /data |
17 | 12 | RUN unzip -q /tmp/old.zip -d /tmp/old/
|
18 | 13 | RUN cp /tmp/old/mods/vinery-1.1.4.jar mods/
|
19 | 14 | RUN cp /tmp/old/mods/Hephaestus-1.18.2-3.5.2.155.jar mods/
|
20 |
| -RUN rm /tmp/pack.zip |
21 |
| -RUN rm /tmp/old.zip |
22 |
| -RUN rm -rf /tmp/old/ |
23 | 15 | RUN curl -fsSL -o "server.jar" "https://meta.fabricmc.net/v2/versions/loader/1.18.2/0.16.3/0.11.1/server/jar"
|
24 | 16 |
|
25 |
| - |
26 |
| -RUN mkdir init |
| 17 | +FROM eclipse-temurin:17-jre-jammy |
| 18 | +COPY --from=builder --chmod=755 /tmp/rcon/rcon /usr/local/bin/rcon-cli |
| 19 | +COPY --from=builder --chmod=644 /tmp/rcon/rcon.yaml /etc/rcon.yaml |
| 20 | +COPY --chmod=755 rcon /usr/local/bin/rcon |
27 | 21 | COPY --chmod=755 entrypoint.sh /entrypoint.sh
|
28 | 22 |
|
| 23 | +COPY --from=builder /data /data |
| 24 | +WORKDIR /data |
| 25 | + |
29 | 26 | VOLUME [ "/data/world", "/data/backups" ]
|
30 | 27 | EXPOSE 25565/tcp
|
31 | 28 |
|
|
0 commit comments