forked from vshn/k8s-storage-bench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (21 loc) · 811 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
FROM golang:1.16.5-buster as builder
RUN apt-get update && apt-get install -y patch
RUN mkdir /kubestr
WORKDIR /kubestr
RUN git clone https://github.com/kastenhq/kubestr.git .
COPY kubestr.patch .
RUN patch -p1 < kubestr.patch
RUN go build -v
FROM python:3.8-slim
RUN apt-get update -y \
&& apt-get install -y bash curl jq \
&& rm -rf /var/lib/apt/lists
COPY --from=builder /kubestr/kubestr /usr/local/bin/kubestr
RUN curl -Lo /usr/local/bin/kubectl \
"https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
&& chmod +x /usr/local/bin/kubectl
RUN mkdir -p /opt/bench
COPY requirements.txt /opt/bench/
RUN pip install -r /opt/bench/requirements.txt
COPY bench.py data.py graphs.py render.py /opt/bench/
ENTRYPOINT ["/opt/bench/bench.py"]