Files
new-domain-redir/Dockerfile
Snowykami 58c1d19469
All checks were successful
Build and Push Container Image / build-and-push-and-deploy (push) Successful in 49s
remove EXPOSE directive from Dockerfile
2025-06-16 15:52:43 +08:00

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"]