forked from syseleven/designate-certmanager-webhook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_test
31 lines (21 loc) · 944 Bytes
/
Dockerfile_test
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
FROM golang:1.15.2
RUN apt-get update && apt-get install -y git bzr ca-certificates curl gcc
WORKDIR /workspace
ENV GO111MODULE=on
ENV TEST_BINPATH=/binpath
RUN mkdir ${TEST_BINPATH}
ENV KUBERNETES 1.15.3
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES}/bin/linux/amd64/kubectl && \
chmod +x ./kubectl; \
mv ./kubectl ${TEST_BINPATH}
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES}/bin/linux/amd64/kube-apiserver && \
chmod +x ./kube-apiserver; \
mv ./kube-apiserver ${TEST_BINPATH}
ENV ETCD 3.3.15
RUN curl -LO https://github.com/etcd-io/etcd/releases/download/v${ETCD}/etcd-v${ETCD}-linux-amd64.tar.gz && \
tar -xvf etcd-v${ETCD}-linux-amd64.tar.gz && \
mv etcd-v${ETCD}-linux-amd64/etcd ${TEST_BINPATH} && \
rm -rf etcd-v${ETCD}-linux-amd64 && rm etcd-v${ETCD}-linux-amd64.tar.gz
COPY go.mod .
COPY go.sum .
RUN go mod download