Files
geoipapi/Dockerfile
Ask Bjørn Hansen 14edfaf0e9
All checks were successful
continuous-integration/drone/push Build is passing
Update base image and Go
2024-12-22 17:19:10 -08:00

22 lines
421 B
Docker

FROM golang:1.23.4-alpine AS build
RUN apk --no-cache add git
WORKDIR /go/src/github.com/abh/geoipapi
ADD . /go/src/github.com/abh/geoipapi
RUN go install -v ./...
FROM alpine:3.21
USER root
RUN apk --no-cache add ca-certificates
RUN apk --no-cache upgrade
RUN addgroup geoip && adduser -D -G geoip geoip
WORKDIR /geoip/
COPY --from=build /go/bin/geoipapi /bin/
ADD start.sh /start.sh
USER geoip
CMD ["/start.sh"]