Files
ip-info/Dockerfile
thuanle 108458682e
All checks were successful
Build Docker Image / build (arm64) (push) Successful in 54s
Build Docker Image / build (amd64) (push) Successful in 2m13s
Build Docker Image / amend-manifest (push) Successful in 5s
add Metric
2024-11-07 09:08:19 +07:00

29 lines
370 B
Docker

# Cache dependency
FROM golang:1.22 AS go-mod-cache
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
# BUILD
FROM go-mod-cache AS build
WORKDIR /app
COPY . .
RUN go build -o ipinfo .
# RUN IMAGE
FROM alpine
RUN apk update && apk upgrade && \
apk add --no-cache tzdata
WORKDIR /app
COPY --from=build /app/ipinfo .
COPY mmdbmeld.yml .
CMD ["./ipinfo"]