Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +21 -20
Dockerfile
CHANGED
@@ -1,27 +1,28 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
|
|
|
|
|
4 |
|
5 |
-
|
|
|
|
|
|
|
|
|
6 |
|
7 |
-
|
|
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
elif [ "$ARCH" = "aarch64" ]; then \
|
13 |
-
FILE_PATTERN="linux-arm64-.*\.zip"; \
|
14 |
-
fi && \
|
15 |
-
TAG=$(curl -s "https://api.github.com/repos/$REPO/releases/latest" | jq -r '.tag_name') && \
|
16 |
-
curl -s "https://api.github.com/repos/$REPO/releases/tags/$TAG" | jq -r --arg FILE_PATTERN $FILE_PATTERN '.assets[] | select(.name | test($FILE_PATTERN)).browser_download_url' | xargs -n 1 curl -LO && \
|
17 |
-
unzip -P linux.do '*.zip' -d ./ && \
|
18 |
-
ZIP_FILE=$(ls *.zip) && DIR_NAME=$(basename "$ZIP_FILE" .zip) && mv $DIR_NAME/* . && \
|
19 |
-
chmod 644 config.json && \
|
20 |
-
sed -i 's/127.0.0.1/0.0.0.0/g' config.json && \
|
21 |
-
rm -rf *.zip && rmdir $DIR_NAME
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
|
|
26 |
EXPOSE 8181
|
|
|
|
|
27 |
CMD ["./fuclaude"]
|
|
|
1 |
+
# 使用官方Ubuntu基础镜像
|
2 |
+
FROM ubuntu:latest
|
3 |
|
4 |
+
# 安装curl、unzip和sed(用于编辑文件)
|
5 |
+
RUN apt-get update && \
|
6 |
+
apt-get install -y curl unzip sed
|
7 |
|
8 |
+
# 下载并解压程序
|
9 |
+
WORKDIR /app
|
10 |
+
RUN curl -L "https://github.com/wozulong/fuclaude/releases/download/v0.2.0/fuclaude-linux-amd64-6d474ee.zip" -o fuclaude.zip && \
|
11 |
+
unzip -P linux.do fuclaude.zip && \
|
12 |
+
rm fuclaude.zip
|
13 |
|
14 |
+
# 进入程序目录
|
15 |
+
WORKDIR /app/fuclaude-linux-amd64-6d474ee
|
16 |
|
17 |
+
# 修改配置文件
|
18 |
+
RUN sed -i 's/127.0.0.1/0.0.0.0/' config.json && \
|
19 |
+
sed -i 's/"signup_enabled": false/"signup_enabled": true/' config.json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
+
# 确保程序文件可执行
|
22 |
+
RUN chmod +x fuclaude config.json
|
23 |
+
|
24 |
+
# 暴露端口8181
|
25 |
EXPOSE 8181
|
26 |
+
|
27 |
+
# 运行程序
|
28 |
CMD ["./fuclaude"]
|