forked from eksctl-io/eksctl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (38 loc) · 1.13 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
ARG EKSCTL_BUILD_IMAGE
FROM $EKSCTL_BUILD_IMAGE AS build
RUN apk add --update \
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 \
busybox \
ca-certificates \
coreutils \
git \
libc6-compat \
libgcc \
libstdc++ \
python \
&& true
ENV EKSCTL $GOPATH/src/github.com/weaveworks/eksctl
RUN mkdir -p "$(dirname ${EKSCTL})"
COPY . $EKSCTL
ARG COVERALLS_TOKEN
ENV COVERALLS_TOKEN $COVERALLS_TOKEN
WORKDIR $EKSCTL
RUN make test && make \
&& cp ./eksctl /out/usr/local/bin/eksctl
RUN go build ./vendor/github.com/heptio/authenticator/cmd/heptio-authenticator-aws \
&& cp ./heptio-authenticator-aws /out/usr/local/bin/heptio-authenticator-aws
RUN pip install --root=/out aws-mfa==0.0.12 awscli==1.15.40
WORKDIR /out
ENV KUBECTL_VERSION v1.10.3
RUN curl --silent --location "https://dl.k8s.io/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" --output usr/local/bin/kubectl \
&& chmod +x usr/local/bin/kubectl
FROM scratch
CMD eksctl
COPY --from=build /out /