mirror of
https://github.com/Luzifer/staticmap.git
synced 2024-12-20 12:51:18 +00:00
31 lines
649 B
Docker
31 lines
649 B
Docker
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:
|