我尝试构建了一版捐助版的docker镜像,成功了,但是启动报错:
The command '/bin/sh -c ./cloudreve' returned a non-zero code: 32
请问 32 code是什么错误呢
附带dockerFile
# docker build -t cloudreve-pro:3.6.4 .
# build frontend
FROM node:16-alpine AS fe-builder
COPY ./assets /assets
WORKDIR /assets
# yarn repo connection is unstable, adjust the network timeout to 10 min.
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
&& apk update \
&& apk add --no-cache wget curl git yarn zip bash \
&& yarn config set registry https://mirrors.cloud.tencent.com/npm/ \
&& yarn config delete proxy \
&& npm config rm proxy \
&& npm config rm https-proxy \
&& yarn config get registry \
&& yarn config set "strict-ssl" false -g \
&& npm install -g cnpm --registry=https://mirrors.cloud.tencent.com/npm/ \
&& npm config set registry https://mirrors.cloud.tencent.com/npm/ \
&& npx browserslist@latest --update-db \
&& yarn install --network-timeout 600000
ENV GENERATE_SOURCEMAP false
RUN yarn run build \
&& zip -r - ./build >assets.zip
# build backend
FROM golang:1.18-alpine AS be-builder
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
&& apk update \
# install dependencies and build tools
&& apk add --no-cache wget curl git build-base gcc==9.2.0-r1 abuild binutils binutils-doc gcc-doc zip bash
WORKDIR /cloudreve_backend
COPY . .
COPY --from=fe-builder /assets/assets.zip ./
RUN go env -w GO111MODULE=on \
&& go env -w GOPROXY=https://goproxy.cn,direct \
&& go build -a -o cloudreve
# build final image
FROM alpine:latest
WORKDIR /cloudreve
COPY --from=be-builder /cloudreve_backend/cloudreve ./cloudreve
RUN ls -l ./cloudreve \
&& sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
&& apk update \
&& apk add --no-cache tzdata \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& chmod +x ./cloudreve \
&& mkdir -p /data/aria2 \
&& chmod -R 766 /data/aria2
EXPOSE 5212
VOLUME ["/cloudreve/uploads", "/cloudreve/avatar", "/data"]
ENTRYPOINT ["./cloudreve"]