Skip to content
This repository was archived by the owner on Nov 17, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM golang:1.13 AS build
ARG VERSION


WORKDIR /go/src/kubecfg
COPY . .

RUN make

FROM gcr.io/distroless/base
COPY --from=build /go/src/kubecfg/kubecfg /
ENTRYPOINT ["/kubecfg"]
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

VERSION ?= dev-$(shell date +%FT%T%z)

BUILDER ?= docker
IMAGE ?= kubecfg
GO ?= go
GO_FLAGS ?= -mod=vendor
GO_LDFLAGS ?=
Expand All @@ -39,6 +41,9 @@ all: kubecfg
kubecfg:
CGO_ENABLED=0 $(GO) build $(GO_FLAGS) $(GO_BUILDFLAGS) .

image:
$(BUILDER) build -t $(IMAGE) --build-arg=VERSION=$(VERSION) .

generate:
$(GO) generate -x $(GO_FLAGS) $(GO_PACKAGES)

Expand Down Expand Up @@ -67,5 +72,6 @@ vendor:
clean:
$(RM) ./kubecfg

.PHONY: all test clean vet fmt vendor

.PHONY: all test clean vet fmt vendor image
.PHONY: kubecfg