locationcode/Dockerfile
Ask Bjørn Hansen e6a44bc92e
All checks were successful
continuous-integration/drone/push Build is passing
Update Go 1.21.0 and dependencies
2023-09-05 23:59:58 -07:00

23 lines
394 B
Docker

FROM golang:1.21.0-alpine3.18 AS build
RUN apk --no-cache add git
WORKDIR /go/src/
ADD . /go/src/
RUN go install -v ./...
FROM alpine:3.18
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"]