-
Notifications
You must be signed in to change notification settings - Fork 32
/
Dockerfile
44 lines (30 loc) · 876 Bytes
/
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
###
## Stage I - Build aws-ssm binary
#
FROM library/golang:1.16-alpine
RUN apk add --update --no-cache git
WORKDIR /go/src/github.com/cmattoon/aws-ssm
COPY . .
RUN go install -v ./...
###
## Stage II - Install aws-iam-authenticator
#
FROM library/alpine:3.14
WORKDIR /tmp
RUN wget https://amazon-eks.s3.us-west-2.amazonaws.com/1.21.2/2021-07-05/bin/linux/amd64/aws-iam-authenticator
RUN chmod +x aws-iam-authenticator
###
## Stage III - Add ca-certificates, binaries
#
FROM library/alpine:3.14
ENV AWS_REGION ""
ENV AWS_ACCESS_KEY ""
ENV AWS_SECRET_KEY ""
ENV METRICS_URL "0.0.0.0:9999"
# Only required if running outside the cluster
ENV MASTER_URL ""
ENV KUBE_CONFIG ""
RUN apk add --update ca-certificates
COPY --from=1 /tmp/aws-iam-authenticator /bin/aws-iam-authenticator
COPY --from=0 /go/bin/aws-ssm /bin/aws-ssm
ENTRYPOINT ["/bin/aws-ssm"]