locationcode/Dockerfile
Ask Bjørn Hansen c8ea6c45c9
Some checks reported errors
continuous-integration/drone/push Build encountered an error
continuous-integration/drone/tag Build is passing
Update Go and dependencies
2025-04-12 16:18:32 -07:00

23 lines
392 B
Docker

FROM golang:1.24-alpine3.21 AS build
RUN apk --no-cache add git
WORKDIR /go/src/
ADD . /go/src/
RUN go install -v ./...
FROM alpine:3.21
USER root
RUN apk --no-cache add ca-certificates
RUN apk --no-cache upgrade
RUN addgroup lc && adduser -D -G lc lc
WORKDIR /
COPY --from=build /go/bin/locationcode /bin/
USER lc
RUN mkdir /tmp/data
CMD ["/bin/locationcode", "-data-dir=/tmp/data"]