1
0
Fork 0
mirror of https://github.com/Luzifer/staticmap.git synced 2024-11-09 01:40:05 +00:00
staticmap/Dockerfile

32 lines
649 B
Text
Raw Normal View History

FROM golang:alpine as builder
COPY . /go/src/github.com/Luzifer/staticmap
WORKDIR /go/src/github.com/Luzifer/staticmap
RUN set -ex \
&& apk add --update git \
&& go install \
-ldflags "-X main.version=$(git describe --tags --always || echo dev)" \
-mod=readonly
FROM alpine:latest
ENV CACHE_DIR /data/map-cache
ENV XDG_CACHE_HOME /data/tile-cache
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
RUN set -ex \
&& apk --no-cache add \
ca-certificates
COPY --from=builder /go/bin/staticmap /usr/local/bin/staticmap
EXPOSE 3000
VOLUME ["/data"]
ENTRYPOINT ["/usr/local/bin/staticmap"]
CMD ["--"]
# vim: set ft=Dockerfile: