kingtest commited on
Commit
2e70148
1 Parent(s): e8bc0f4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -20
Dockerfile CHANGED
@@ -1,27 +1,28 @@
1
- FROM alpine:latest as builder
 
2
 
3
- RUN apk add --no-cache curl jq unzip
 
 
4
 
5
- WORKDIR /tmp
 
 
 
 
6
 
7
- ENV REPO="wozulong/fuclaude"
 
8
 
9
- RUN ARCH=$(uname -m) && \
10
- if [ "$ARCH" = "x86_64" ]; then \
11
- FILE_PATTERN="linux-amd64-.*\.zip"; \
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
- FROM alpine:latest
24
- WORKDIR /app
25
- COPY --from=builder /tmp/ .
 
26
  EXPOSE 8181
 
 
27
  CMD ["./fuclaude"]
 
1
+ # 使用官方Ubuntu基础镜像
2
+ FROM ubuntu:latest
3
 
4
+ # 安装curlunzip和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"]