2017-06-27 20:51:36 +00:00
|
|
|
FROM golang:alpine
|
|
|
|
|
|
|
|
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
|
|
|
|
2017-06-27 21:51:08 +00:00
|
|
|
ENV CACHE_DIR /data/map-cache
|
|
|
|
ENV XDG_CACHE_HOME /data/tile-cache
|
2017-06-27 20:51:36 +00:00
|
|
|
|
2018-04-03 18:39:24 +00:00
|
|
|
COPY . /go/src/github.com/Luzifer/staticmap
|
2017-06-27 20:51:36 +00:00
|
|
|
WORKDIR /go/src/github.com/Luzifer/staticmap
|
|
|
|
|
|
|
|
RUN set -ex \
|
2018-04-03 18:39:24 +00:00
|
|
|
&& apk --no-cache add git ca-certificates \
|
2017-06-27 20:51:36 +00:00
|
|
|
&& go install -ldflags "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)" \
|
2018-04-03 18:39:24 +00:00
|
|
|
&& apk --no-cache del --purge git
|
2017-06-27 20:51:36 +00:00
|
|
|
|
|
|
|
EXPOSE 3000
|
|
|
|
|
|
|
|
VOLUME ["/data"]
|
|
|
|
|
|
|
|
ENTRYPOINT ["/go/bin/staticmap"]
|
|
|
|
CMD ["--"]
|