mirror of
https://github.com/Luzifer/cloudkeys-go.git
synced 2024-11-08 22:20:05 +00:00
Knut Ahlers
76a6a0100a
* Switch to Go 1.12+ modules Signed-off-by: Knut Ahlers <knut@ahlers.me> * Wipe vendor directory Signed-off-by: Knut Ahlers <knut@ahlers.me> * Add dockerized builder Signed-off-by: Knut Ahlers <knut@ahlers.me> * Update image to build on recent Go version Signed-off-by: Knut Ahlers <knut@ahlers.me>
28 lines
597 B
Docker
28 lines
597 B
Docker
FROM golang:alpine as builder
|
|
|
|
COPY . /go/src/github.com/Luzifer/cloudkeys-go
|
|
WORKDIR /go/src/github.com/Luzifer/cloudkeys-go
|
|
|
|
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
|
|
|
|
COPY --from=builder /go/bin/cloudkeys-go /usr/local/bin/cloudkeys-go
|
|
|
|
EXPOSE 3000
|
|
VOLUME ["/data"]
|
|
|
|
ENTRYPOINT ["/usr/local/bin/cloudkeys-go"]
|
|
CMD ["--"]
|
|
|
|
# vim: set ft=Dockerfile:
|