2021-02-19 18:26:07 +00:00
|
|
|
FROM golang:alpine as builder
|
2017-06-27 20:51:36 +00:00
|
|
|
|
2021-02-19 18:26:07 +00:00
|
|
|
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
|
2017-06-27 20:51:36 +00:00
|
|
|
|
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
|
|
|
|
2021-02-19 18:26:07 +00:00
|
|
|
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
2017-06-27 20:51:36 +00:00
|
|
|
|
|
|
|
RUN set -ex \
|
2021-02-19 18:26:07 +00:00
|
|
|
&& apk --no-cache add \
|
|
|
|
ca-certificates
|
2017-06-27 20:51:36 +00:00
|
|
|
|
2021-02-19 18:26:07 +00:00
|
|
|
COPY --from=builder /go/bin/staticmap /usr/local/bin/staticmap
|
2017-06-27 20:51:36 +00:00
|
|
|
|
2021-02-19 18:26:07 +00:00
|
|
|
EXPOSE 3000
|
2017-06-27 20:51:36 +00:00
|
|
|
VOLUME ["/data"]
|
|
|
|
|
2021-02-19 18:26:07 +00:00
|
|
|
ENTRYPOINT ["/usr/local/bin/staticmap"]
|
2017-06-27 20:51:36 +00:00
|
|
|
CMD ["--"]
|
2021-02-19 18:26:07 +00:00
|
|
|
|
|
|
|
# vim: set ft=Dockerfile:
|