fix: dockerfile

This commit is contained in:
Zhang Minghan 2024-01-25 11:06:21 +08:00
parent a159b5fbf3
commit 8c07b4daae

View File

@ -4,7 +4,7 @@
FROM golang:1.20 AS backend FROM golang:1.20 AS backend
WORKDIR / WORKDIR /backend
COPY . . COPY . .
# Set go proxy to https://goproxy.cn (open for vps in China Mainland) # Set go proxy to https://goproxy.cn (open for vps in China Mainland)
@ -39,8 +39,10 @@ RUN apk update && \
RUN echo "Asia/Shanghai" > /etc/timezone && \ RUN echo "Asia/Shanghai" > /etc/timezone && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
WORKDIR /
# Copy dist # Copy dist
COPY --from=backend / / COPY --from=backend /backend /
COPY --from=frontend /app/dist /app/dist COPY --from=frontend /app/dist /app/dist
# Expose port # Expose port