Commit 68798224 authored by Geoff Simmons's avatar Geoff Simmons

Make the controller executable smaller, hence also the container image.

parent 7075525b
...@@ -64,7 +64,8 @@ generate: install-code-gen ...@@ -64,7 +64,8 @@ generate: install-code-gen
--output-package $(CLIENTPKG)/informers -h $(BOILERPLATE) --output-package $(CLIENTPKG)/informers -h $(BOILERPLATE)
k8s-ingress: build k8s-ingress: build
CGO_ENABLED=0 GOOS=linux vgo build -o k8s-ingress cmd/*.go CGO_ENABLED=0 GOOS=linux vgo build -ldflags="-w -s" -o k8s-ingress \
cmd/*.go
check: build check: build
golint ./pkg/controller/... golint ./pkg/controller/...
......
...@@ -18,7 +18,7 @@ COPY ./cmd/ /go/src/code.uplex.de/uplex-varnish/k8s-ingress/cmd/ ...@@ -18,7 +18,7 @@ COPY ./cmd/ /go/src/code.uplex.de/uplex-varnish/k8s-ingress/cmd/
COPY ./.git/ /go/src/code.uplex.de/uplex-varnish/k8s-ingress/.git/ COPY ./.git/ /go/src/code.uplex.de/uplex-varnish/k8s-ingress/.git/
RUN vgo generate ./cmd/... && vgo build ./pkg/... ./cmd/... && \ RUN vgo generate ./cmd/... && vgo build ./pkg/... ./cmd/... && \
CGO_ENABLED=0 GOOS=linux vgo build -o k8s-ingress cmd/*.go CGO_ENABLED=0 GOOS=linux vgo build -ldflags="-w -s" -o k8s-ingress cmd/*.go
FROM alpine:3.8 FROM alpine:3.8
COPY --from=builder /go/src/code.uplex.de/uplex-varnish/k8s-ingress/k8s-ingress /k8s-ingress COPY --from=builder /go/src/code.uplex.de/uplex-varnish/k8s-ingress/k8s-ingress /k8s-ingress
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment