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