kingtest commited on
Commit
0b3631a
1 Parent(s): abc1579

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ sed -i 's/127.0.0.1/0.0.0.0/g' config.json && \
20
+ rm -rf *.zip && rmdir $DIR_NAME
21
+
22
+ FROM alpine:latest
23
+ WORKDIR /app
24
+ COPY --from=builder /tmp/ .
25
+ EXPOSE 8181
26
+ CMD ["./fuclaude"]