FROM alpine:latest as builder RUN apk add --no-cache curl jq unzip WORKDIR /tmp ENV REPO="wozulong/fuclaude" RUN ARCH=$(uname -m) && \ if [ "$ARCH" = "x86_64" ]; then \ FILE_PATTERN="linux-amd64-.*\.zip"; \ elif [ "$ARCH" = "aarch64" ]; then \ FILE_PATTERN="linux-arm64-.*\.zip"; \ fi && \ TAG=$(curl -s "https://api.github.com/repos/$REPO/releases/latest" | jq -r '.tag_name') && \ 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 && \ unzip -P linux.do '*.zip' -d ./ && \ ZIP_FILE=$(ls *.zip) && DIR_NAME=$(basename "$ZIP_FILE" .zip) && mv $DIR_NAME/* . && \ sed -i 's/127.0.0.1/0.0.0.0/g' config.json && \ rm -rf *.zip && rmdir $DIR_NAME FROM alpine:latest WORKDIR /app COPY --from=builder /tmp/ . EXPOSE 8181 CMD ["./fuclaude"]