From dd89a499d51d910c851cd2e09acf3f902c761c19 Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Tue, 13 Feb 2024 15:33:58 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=AE=9E=E7=8E=B0=E9=A1=B9=E7=9B=AE):=20?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 17 +++++++++++++++++ .gitignore | 3 +++ Dockerfile | 32 ++++++++++++++++++++++++++++++++ README.md | 17 ++++++++++++++++- 4 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 .drone.yml create mode 100644 .gitignore create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..09eba35 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,17 @@ +kind: pipeline +type: docker +name: default +node: + region: cn +steps: + - name: docker-cn + pull: if-not-exists + image: plugins/docker + settings: + repo: ccr.ccs.tencentyun.com/xiaoqidun/palgs + registry: ccr.ccs.tencentyun.com + username: + from_secret: docker_username + password: + from_secret: docker_password + dockerfile: Dockerfile \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..77c6356 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.idea/ +.vscode/ +.devcontainer/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4f13c7b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +# 基础镜像 +FROM debian:bookworm + +# 作者信息 +LABEL MAINTAINER="xiaoqidun@gmail.com" + +# 软件仓库 +RUN sed -i "s|deb.debian.org|mirrors.ustc.edu.cn|g" /etc/apt/sources.list.d/debian.sources \ + && sed -i "s|main|main contrib non-free non-free-firmware|g" /etc/apt/sources.list.d/debian.sources + +# 安装软件 +RUN echo steam steam/question select "I AGREE" | debconf-set-selections \ + && echo steam steam/license note '' | debconf-set-selections \ + && dpkg --add-architecture i386 \ + && apt-get update \ + && apt-get install -y curl steamcmd \ + && rm -rf /var/lib/apt/lists/* + +# 切换用户 +RUN useradd -m steam +USER steam + +# 安装服务 +RUN /usr/games/steamcmd +login anonymous +app_update 2394010 validate +quit \ + && mkdir -p /home/steam/.steam/sdk64 \ + && cp /home/steam/.local/share/Steam/steamcmd/linux64/steamclient.so /home/steam/.steam/sdk64/steamclient.so + +# 工作目录 +WORKDIR /home/steam/.local/share/Steam/steamapps/common/PalServer + +# 启动命令 +ENTRYPOINT ["./PalServer.sh"] \ No newline at end of file diff --git a/README.md b/README.md index c87c4b9..07fbca8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,17 @@ # palgs -Palworld Game Server + +Palworld Game Server(幻兽帕鲁游戏服务器) + +# docker + +## 拉取镜像 + +``` +docker pull ccr.ccs.tencentyun.com/xiaoqidun/palgs:latest +``` + +## 运行镜像 + +``` +docker run -d -p 8211:8211/udp ccr.ccs.tencentyun.com/xiaoqidun/palgs:latest +```