sss / Dockerfile
asfag654's picture
Update Dockerfile
b03249d verified
FROM ubuntu:22.04
EXPOSE 1242
# 设置时区
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone
# 安装系统依赖
RUN apt-get update && \
apt-get upgrade -y -qq && \
apt-get install -y -qq \
tzdata ca-certificates libc6 libgcc-s1 libicu70 libgssapi-krb5-2 \
libssl3 libstdc++6 zlib1g git wget p7zip-full python3.10 python3-pip \
fonts-wqy-zenhei fonts-wqy-microhei fonts-arphic-ukai fonts-arphic-uming
RUN wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
apt-get update && \
apt-get install -y -qq dotnet-runtime-9.0 dotnet-sdk-9.0 && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean
# 设置工作目录
WORKDIR /zmal
# 克隆项目
RUN git clone https://github.com/dmcallejo/ASFBot.git
# 下载 ASF 和插件
RUN wget -q https://github.com/JustArchiNET/ArchiSteamFarm/releases/latest/download/ASF-generic.zip && \
wget -q https://github.com/Citrinate/FreePackages/releases/latest/download/FreePackages.zip && \
wget -q https://github.com/CatPoweredPlugins/ASFAchievementManager/releases/latest/download/ASFAchievementManager.zip && \
wget -q https://github.com/chr233/ASFEnhance/releases/latest/download/ASFEnhance.zip
# 解压文件
RUN 7z x ASF-generic.zip -o/zmal/ && \
7z x FreePackages.zip -o/zmal/plugins/ && \
7z x ASFAchievementManager.zip -o/zmal/plugins/ASFAchievementManager/ && \
7z x ASFEnhance.zip -o/zmal/plugins/ && \
rm -f ASF-generic.zip FreePackages.zip ASFAchievementManager.zip ASFEnhance.zip
COPY config.7z /zmal/
RUN --mount=type=secret,id=zzz,mode=0444,required=true \
7z x -p"$(cat /run/secrets/zzz)" config.7z -o/zmal/config/ && \
rm -f config.7z
# 设置目录权限
RUN chmod -R 777 /zmal
# 启动服务
CMD bash ArchiSteamFarm-Service.sh