From 5e3720e8fafdb8c4d40ef0129e8bf2c2cb2f4e70 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Sat, 21 Jul 2018 20:02:26 -0400 Subject: [PATCH] add fleet Signed-off-by: Jess Frazelle --- fleet/Dockerfile | 33 +++++++++++++++++++++++++++++++++ latest-versions.sh | 1 + 2 files changed, 34 insertions(+) create mode 100644 fleet/Dockerfile diff --git a/fleet/Dockerfile b/fleet/Dockerfile new file mode 100644 index 0000000..f6fe659 --- /dev/null +++ b/fleet/Dockerfile @@ -0,0 +1,33 @@ +FROM golang:alpine as builder +MAINTAINER Jessica Frazelle + +ENV PATH /go/bin:/usr/local/go/bin:$PATH +ENV GOPATH /go + +RUN apk add --no-cache \ + ca-certificates \ + gcc \ + git \ + make \ + npm \ + yarn + +ENV FLEET_VERSION 2.0.0-rc3 + +RUN git clone --depth 1 --branch "${FLEET_VERSION}" https://github.com/kolide/fleet.git /go/src/github.com/kolide/fleet + +WORKDIR /go/src/github.com/kolide/fleet + +RUN make deps generate + +RUN CGO_ENABLED=0 go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o /usr/bin/fleet ./cmd/fleet +RUN CGO_ENABLED=0 go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o /usr/bin/fleetctl ./cmd/fleetctl + +FROM scratch + +COPY --from=builder /usr/bin/fleet /usr/bin/fleet +COPY --from=builder /usr/bin/fleetctl /usr/bin/fleetctl +COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs + +ENTRYPOINT [ "fleet" ] +CMD [ "--help" ] diff --git a/latest-versions.sh b/latest-versions.sh index 22c8a2e..410c619 100755 --- a/latest-versions.sh +++ b/latest-versions.sh @@ -101,6 +101,7 @@ hashicorp/consul coredns/coredns CouchPotato/CouchPotatoServer curl/curl +kolide/fleet GoogleCloudPlatform/cloud-sdk-docker google/gitiles bazelbuild/bazel