From 66c9d9621671ced8f4fe42bf098009a53d7a13fc Mon Sep 17 00:00:00 2001 From: AirryCo Date: Tue, 3 Dec 2024 14:58:38 +0800 Subject: [PATCH] docker: change builder from `node:20.11.1-alpine` to `node:20.11.1-bullyseye`. --- docker/Dockerfile | 7 ++++--- docker/Dockerfile-fika | 7 ++++--- docker/Dockerfile-nightly | 7 ++++--- docker/Dockerfile-nightly-fika | 7 ++++--- docker/entrypoint.sh | 2 +- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 8a3c8e4..7e00036 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,9 +1,10 @@ -FROM node:20.11.1-alpine AS server-builder -RUN apk add --no-cache git git-lfs && \ +FROM node:20.11.1-bullseye AS server-builder +RUN apt update && apt install -y git git-lfs p7zip-full && \ git clone -b master --depth=1 https://github.com/AirryCo/spt-server.git /snapshot && \ cd /snapshot && git lfs pull && \ cd project && \ - npm install && npm run build:release + npm install && npm run build:release && \ + rm -rf /var/lib/apt/lists/* FROM debian:bookworm-slim LABEL author="AirryCo " diff --git a/docker/Dockerfile-fika b/docker/Dockerfile-fika index 4d9edb4..08f73d7 100644 --- a/docker/Dockerfile-fika +++ b/docker/Dockerfile-fika @@ -5,12 +5,13 @@ RUN apk add --no-cache git unzip && \ npm install && npm run build && \ mkdir output && cd output && unzip /fika-server/dist/fika-server.zip -FROM node:20.11.1-alpine AS server-builder -RUN apk add --no-cache git git-lfs && \ +FROM node:20.11.1-bullseye AS server-builder +RUN apt update && apt install -y git git-lfs p7zip-full && \ git clone -b master --depth=1 https://github.com/AirryCo/spt-server.git /snapshot && \ cd /snapshot && git lfs pull && \ cd project && \ - npm install && npm run build:release + npm install && npm run build:release && \ + rm -rf /var/lib/apt/lists/* FROM debian:bookworm-slim LABEL author="AirryCo " diff --git a/docker/Dockerfile-nightly b/docker/Dockerfile-nightly index 54f90ce..c616445 100644 --- a/docker/Dockerfile-nightly +++ b/docker/Dockerfile-nightly @@ -1,9 +1,10 @@ -FROM node:20.11.1-alpine AS server-builder -RUN apk add --no-cache git git-lfs && \ +FROM node:20.11.1-bullseye AS server-builder +RUN apt update && apt install -y git git-lfs p7zip-full && \ git clone -b 3.10.0-DEV --depth=1 https://github.com/AirryCo/spt-server.git /snapshot && \ cd /snapshot && git lfs pull && \ cd project && \ - npm install && npm run build:release + npm install && npm run build:release && \ + rm -rf /var/lib/apt/lists/* FROM debian:bookworm-slim LABEL author="AirryCo " diff --git a/docker/Dockerfile-nightly-fika b/docker/Dockerfile-nightly-fika index a3e5625..f3a6b87 100644 --- a/docker/Dockerfile-nightly-fika +++ b/docker/Dockerfile-nightly-fika @@ -5,12 +5,13 @@ RUN apk add --no-cache git unzip && \ npm install && npm run build && \ mkdir output && cd output && unzip /fika-server/dist/fika-server.zip -FROM node:20.11.1-alpine AS server-builder -RUN apk add --no-cache git git-lfs && \ +FROM node:20.11.1-bullseye AS server-builder +RUN apt update && apt install -y git git-lfs p7zip-full && \ git clone -b 3.10.0-DEV --depth=1 https://github.com/AirryCo/spt-server.git /snapshot && \ cd /snapshot && git lfs pull && \ cd project && \ - npm install && npm run build:release + npm install && npm run build:release && \ + rm -rf /var/lib/apt/lists/* FROM debian:bookworm-slim LABEL author="AirryCo " diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index d2a85e4..3847a10 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -38,7 +38,7 @@ fi sed -i "0,/127.0.0.1/s/127.0.0.1/${IP}/" SPT_Data/Server/configs/http.json sed -i "s/[0-9]\{1,\},/${PORT},/g" SPT_Data/Server/configs/http.json -tac SPT_Data/Server/configs/http.json | sed "0,/${PORT},/s/${PORT},/$webSocketPingDelayMs,/" | tac | tee SPT_Data/Server/configs/http.json > /dev/null +tac SPT_Data/Server/configs/http.json | sed "0,/${PORT},/s/${PORT},/$PINGDELAYMS,/" | tac | tee SPT_Data/Server/configs/http.json > /dev/null chmod +x SPT.Server && ./SPT.Server