8dbe2315c3
Change the base image in the Dockerfile to utilize the amd64 version of the golang image. This ensures compatibility with the target architecture for builds and improves the reliability of the build process.
11 lines
364 B
Docker
11 lines
364 B
Docker
FROM amd64/golang:1.24.0@sha256:4a3f1013f696a1f86314902f2c9907fe712eabc91e911cc9fde4fdc57a16d35d as builder
|
|
WORKDIR /src
|
|
COPY * ./
|
|
RUN go get
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o geo-service .
|
|
|
|
FROM scratch
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
COPY --from=builder /src/geo-service /
|
|
CMD ["/geo-service"]
|