mirror of https://github.com/certd/certd
chore:
parent
cbe3498125
commit
0f572f4cb3
|
@ -10,13 +10,25 @@ RUN npm install -g pnpm@8.15.7
|
|||
RUN cp /workspace/certd-client/dist/* /workspace/certd-server/public/ -rf
|
||||
RUN cd /workspace/certd-server && pnpm install && npm run build-on-docker
|
||||
|
||||
|
||||
FROM node:18-alpine
|
||||
RUN apk add --no-cache openssl
|
||||
RUN apk add --no-cache openjdk8
|
||||
WORKDIR /app/
|
||||
COPY --from=builder /workspace/certd-server/ /app/
|
||||
|
||||
ENV LEGO_VERSION=4.19.2
|
||||
ENV LEGO_DOWNLOAD_DIR /app/tools/linux
|
||||
RUN mkdir -p $LEGO_DOWNLOAD_DIR
|
||||
|
||||
# 根据架构下载不同的文件
|
||||
RUN ARCH=$(uname -m) && \
|
||||
if [ "$ARCH" = "x86_64" ]; then \
|
||||
wget -O $LEGO_DOWNLOAD_DIR/lego_linux_amd64.tar.gz https://github.com/go-acme/lego/releases/download/v${LEGO_VERSION}/lego_v${LEGO_VERSION}_linux_arm64.tar.gz; \
|
||||
elif [ "$ARCH" = "aarch64" ]; then \
|
||||
wget -O $LEGO_DOWNLOAD_DIR/lego_linux_arm64.tar.gz https://github.com/go-acme/lego/releases/download/v${LEGO_VERSION}/lego_v${LEGO_VERSION}_linux_amd64.tar.gz; \
|
||||
else \
|
||||
echo "Unsupported architecture: $ARCH"; \
|
||||
fi
|
||||
|
||||
ENV TZ=Asia/Shanghai
|
||||
ENV NODE_ENV=production
|
||||
|
|
Loading…
Reference in New Issue