This commit is contained in:
Sakurasan
2024-04-21 00:54:57 +08:00
parent 151757c2fe
commit 752053f7c4
3 changed files with 5 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ WORKDIR /frontend-build
COPY ./web/ .
RUN npm install && npm run build && rm -rf node_modules
FROM golang:1.19-alpine as builder
FROM golang:1.21-alpine as builder
LABEL anther="github.com/Sakurasan"
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && apk --no-cache add make cmake upx
WORKDIR /build
@@ -11,7 +11,7 @@ COPY --from=frontend /frontend-build/dist /build/dist
COPY . /build
ENV GO111MODULE=on
# ENV GOPROXY=https://goproxy.cn,direct
CMD [ "go mod download" ]
CMD [ "go mod tidy","go mod download" ]
RUN make build
FROM alpine:latest AS runner