feat(实现项目): 实现项目
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
xiaoqidun 2024-02-13 15:33:58 +08:00
parent b4427690fc
commit dd89a499d5
4 changed files with 68 additions and 1 deletions

17
.drone.yml Normal file
View File

@ -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

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.idea/
.vscode/
.devcontainer/

32
Dockerfile Normal file
View File

@ -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"]

View File

@ -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
```