From a645290a2147bc5cd1051515b143075583861bd1 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 3 Aug 2019 20:22:40 +0200 Subject: [PATCH] Add minimal Dockerfile without alpine base closes #5 Signed-off-by: Knut Ahlers --- .dockerignore | 1 + Dockerfile.minimal | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile.minimal diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..85de9cf --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +src diff --git a/Dockerfile.minimal b/Dockerfile.minimal new file mode 100644 index 0000000..63a3d9a --- /dev/null +++ b/Dockerfile.minimal @@ -0,0 +1,23 @@ +FROM golang:alpine as builder + +ENV CGO_ENABLED=0 + +ADD . /go/src/github.com/Luzifer/ots +WORKDIR /go/src/github.com/Luzifer/ots + +RUN set -ex \ + && apk add --update git \ + && go install -ldflags "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)" + +FROM scratch + +LABEL maintainer "Knut Ahlers " + +COPY --from=builder /go/bin/ots /usr/local/bin/ots + +EXPOSE 3000 + +ENTRYPOINT ["/usr/local/bin/ots"] +CMD ["--"] + +# vim: set ft=Dockerfile: