refactor Dockerfile to streamline build process and remove unnecessary dependencies
All checks were successful
Build and Push Container Image / build-and-push-and-deploy (push) Successful in 52s
All checks were successful
Build and Push Container Image / build-and-push-and-deploy (push) Successful in 52s
This commit is contained in:
@ -5,12 +5,6 @@ ENV TZ=Asia/Chongqing
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apk --no-cache add build-base git tzdata
|
|
||||||
|
|
||||||
COPY go.mod go.sum ./
|
|
||||||
|
|
||||||
RUN go mod download
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN go build -o main main.go
|
RUN go build -o main main.go
|
||||||
@ -22,8 +16,6 @@ ENV TZ=Asia/Chongqing
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apk --no-cache add tzdata ca-certificates libc6-compat libgcc libstdc++
|
|
||||||
|
|
||||||
COPY --from=builder /app/main /app/main
|
COPY --from=builder /app/main /app/main
|
||||||
|
|
||||||
EXPOSE 8888
|
EXPOSE 8888
|
||||||
|
Reference in New Issue
Block a user