-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update and cleanup Dockerfiles #261
Conversation
@gruebel thanks a lot, this LGTM. I'll try it out locally, and see if I can figure why CircleCI is unhappy. |
I was able to reproduce the same error locally with
|
I'm going to edit makefile locally to debug this, but it seems like breaking this
Right we can only speculate which of the commands produces this error, but we aren't actually concerned with the usage of docker layers here, as the image will get squashed anyway. diff --git a/Dockerfile b/Dockerfile
index c3236cbc..5eed3b2f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -28,7 +28,9 @@ ARG COVERALLS_TOKEN
ENV COVERALLS_TOKEN $COVERALLS_TOKEN
WORKDIR $EKSCTL
-RUN make lint && make test && make build \
+RUN make lint
+RUN make test
+RUN make build \
&& cp ./eksctl /out/usr/local/bin/eksctl
RUN go build ./vendor/github.com/kubernetes-sigs/aws-iam-authenticator/cmd/aws-iam-authenticator \ |
So here is what I've been able to find out:
Here are my local changes: diff --git a/Dockerfile b/Dockerfile
index c3236cbc..5eed3b2f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -28,7 +28,9 @@ ARG COVERALLS_TOKEN
ENV COVERALLS_TOKEN $COVERALLS_TOKEN
WORKDIR $EKSCTL
-RUN make lint && make test && make build \
+RUN make lint
+RUN make test
+RUN make build \
&& cp ./eksctl /out/usr/local/bin/eksctl
RUN go build ./vendor/github.com/kubernetes-sigs/aws-iam-authenticator/cmd/aws-iam-authenticator \
diff --git a/Makefile b/Makefile
index e2624db6..03e0dc98 100644
--- a/Makefile
+++ b/Makefile
@@ -24,7 +24,7 @@ build: ## Build eksctl
test: generate ## Run unit tests
@git diff --exit-code pkg/nodebootstrap/assets.go > /dev/null || (git --no-pager diff; exit 1)
@git diff --exit-code ./pkg/eks/mocks > /dev/null || (git --no-pager diff; exit 1)
- @go test -v -covermode=count -coverprofile=coverage.out ./pkg/... ./cmd/...
+ go test -v -covermode=count -coverprofile=coverage.out -tags netgo ./pkg/... ./cmd/...
@test -z $(COVERALLS_TOKEN) || $(GOPATH)/bin/goveralls -coverprofile=coverage.out -service=circle-ci
LINTER ?= gometalinter ./... |
@@ -24,7 +24,7 @@ build: ## Build eksctl | |||
test: generate ## Run unit tests | |||
@git diff --exit-code pkg/nodebootstrap/assets.go > /dev/null || (git --no-pager diff; exit 1) | |||
@git diff --exit-code ./pkg/eks/mocks > /dev/null || (git --no-pager diff; exit 1) | |||
@go test -v -covermode=count -coverprofile=coverage.out ./pkg/... ./cmd/... | |||
@CGO_ENABLED=0 go test -v -covermode=count -coverprofile=coverage.out ./pkg/... ./cmd/... |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Description
Updated the build Dockerfile to the newest Golang version 1.11.X, go dep version 0.5.0 and Alpine 3.8.
Updated awscli pip package to version 1.16.33 in the root Dockerfile.
In general removed unneeded steps and changed
apk add
to use the--no-cache
parameter for preventing apk to cache the package index inside the container.Checklist
make build
)make test
)humans.txt
file