HuggingFace0920 commited on
Commit
7d711cd
·
verified ·
1 Parent(s): fef3127

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +53 -0
Dockerfile ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用官方Ubuntu基础镜像
2
+ FROM ubuntu:22.04
3
+ EXPOSE 1242
4
+
5
+ # 设置时区
6
+ ENV TZ=Asia/Shanghai
7
+ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
8
+ echo $TZ > /etc/timezone
9
+
10
+ # 安装系统依赖
11
+ RUN apt-get update && \
12
+ apt-get upgrade -y -qq && \
13
+ apt-get install -y -qq \
14
+ tzdata ca-certificates libc6 libgcc-s1 libicu70 libgssapi-krb5-2 \
15
+ libssl3 libstdc++6 zlib1g git wget p7zip-full python3.10 python3-pip \
16
+ fonts-wqy-zenhei fonts-wqy-microhei fonts-arphic-ukai fonts-arphic-uming
17
+
18
+ RUN wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb && \
19
+ dpkg -i packages-microsoft-prod.deb && \
20
+ apt-get update && \
21
+ apt-get install -y -qq dotnet-runtime-9.0 dotnet-sdk-9.0 && \
22
+ rm -rf /var/lib/apt/lists/* && \
23
+ apt-get clean
24
+
25
+ # 设置工作目录
26
+ WORKDIR /ArchiSteamFarm
27
+
28
+ # 下载 ArchiSteamFarm 和第三方插件
29
+ RUN wget -q https://github.com/JustArchiNET/ArchiSteamFarm/releases/latest/download/ASF-linux-x64.zip && \
30
+ # ⚠下面为自用插件:自动获取免费游戏、自动获取免费点数商店物品、自动获取免费贴纸。请按之前的操作按需修改。⚠
31
+ wget -q https://github.com/Citrinate/FreePackages/releases/latest/download/FreePackages.zip && \
32
+ wget -q https://github.com/DevSplash/FreePointsShop/releases/latest/download/FreePointsShop.zip && \
33
+ wget -q https://github.com/DevSplash/ASFAutoClaimStickers/releases/latest/download/AutoClaimStickers.zip
34
+
35
+ # 解压 ArchiSteamFarm 和第三方插件
36
+ RUN 7z x ASF-linux-x64.zip -o/ArchiSteamFarm/ && \
37
+ # ⚠下面为自用插件:自动获取免费游戏、自动获取免费点数商店物品、自动获取免费贴纸。请按之前的操作按需修改。⚠
38
+ 7z x FreePackages.zip -o/ArchiSteamFarm/plugins/ && \
39
+ 7z x FreePointsShop.zip -o/ArchiSteamFarm/plugins/FreePointsShop/ && \
40
+ 7z x AutoClaimStickers.zip -o/ArchiSteamFarm/plugins/AutoClaimStickers/ && \
41
+ rm -f ASF-linux-x64.zip FreePackages.zip FreePointsShop.zip AutoClaimStickers.zip
42
+
43
+ # 导入 config 文件
44
+ COPY config.7z /ArchiSteamFarm/
45
+ RUN --mount=type=secret,id=PASSWORD,mode=0444,required=true \
46
+ 7z x -p"$(cat /run/secrets/PASSWORD)" config.7z -o/ArchiSteamFarm/config/ && \
47
+ rm -f config.7z
48
+
49
+ # 设置目录权限
50
+ RUN chmod -R 777 /ArchiSteamFarm
51
+
52
+ # 启动服务
53
+ CMD bash ArchiSteamFarm-Service.sh