Skip to content

Commit

Permalink
Update and cleanup Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
gruebel authored and Anton Gruebel committed Oct 16, 2018
1 parent d2ed775 commit 1b8eb39
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
ARG EKSCTL_BUILD_IMAGE
FROM $EKSCTL_BUILD_IMAGE AS build

RUN apk add --update \
RUN apk add --no-cache \
py-pip \
python \
python-dev \
&& true

RUN mkdir /out
RUN mkdir -p /out/etc/apk && cp -r /etc/apk/* /out/etc/apk/
RUN apk add --no-cache --initdb --root /out \
alpine-baselayout \
Expand All @@ -29,13 +28,15 @@ 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 \
&& cp ./aws-iam-authenticator /out/usr/local/bin/aws-iam-authenticator

RUN pip install --root=/out aws-mfa==0.0.12 awscli==1.15.40
RUN pip install --root=/out aws-mfa==0.0.12 awscli==1.16.34

WORKDIR /out

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/...
@test -z $(COVERALLS_TOKEN) || $(GOPATH)/bin/goveralls -coverprofile=coverage.out -service=circle-ci

LINTER ?= gometalinter ./...
Expand Down
8 changes: 3 additions & 5 deletions build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM golang:1.10.2-alpine3.7
FROM golang:1.11-alpine3.8

RUN apk add --update \
RUN apk add --no-cache \
curl \
git \
make \
gcc \
&& true

ENV DEP_VERSION v0.4.1
ENV DEP_VERSION v0.5.0

# Install dep to avoid vendoring all the things
RUN curl --silent --location "https://github.com/golang/dep/releases/download/${DEP_VERSION}/dep-linux-amd64" --output /usr/local/bin/dep \
Expand All @@ -21,8 +21,6 @@ WORKDIR $EKSCTL_BUILD

RUN dep ensure

WORKDIR $EKSCTL_BUILD

RUN ./install.sh

WORKDIR $EKSCTL_BUILD/vendor/github.com/goreleaser/goreleaser
Expand Down

0 comments on commit 1b8eb39

Please sign in to comment.