All checks were successful
Build and Push Container Image / build-and-push-and-deploy (push) Successful in 49s
23 lines
342 B
Docker
23 lines
342 B
Docker
# build
|
|
FROM reg.liteyuki.org/dockerhub/golang:1.24.2-alpine3.21 AS builder
|
|
|
|
ENV TZ=Asia/Chongqing
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN go build -o main main.go
|
|
|
|
# production
|
|
FROM reg.liteyuki.org/dockerhub/alpine:latest AS prod
|
|
|
|
ENV TZ=Asia/Chongqing
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=builder /app/main /app/main
|
|
|
|
RUN chmod +x ./main
|
|
|
|
ENTRYPOINT ["./main"] |