forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
116 lines (96 loc) · 3.65 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
ARG ARCH
FROM ${ARCH}/fedora:32
COPY qemu-ppc64le-static /usr/bin/qemu-ppc64le-static
COPY qemu-aarch64-static /usr/bin/qemu-aarch64-static
ARG SONOBUOY_ARCH
ARG BAZEL_ARCH
ENV BAZEL_VERSION 3.7.2
ENV KUBEVIRT_CREATE_BAZELRCS false
# Install packages
RUN dnf install -y dnf-plugins-core && \
dnf -y install \
java-11-openjdk-devel \
libvirt-devel \
cpio \
patch \
make \
git \
mercurial \
sudo \
gcc \
gcc-c++ \
glibc-static \
libstdc++-static \
glibc-devel \
findutils \
rsync-daemon \
rsync \
qemu-img \
protobuf-compiler \
python3-devel \
python3-pip \
python \
redhat-rpm-config \
jq \
wget \
diffutils && \
dnf -y clean all
# install gradle (required for swagger)
RUN wget https://services.gradle.org/distributions/gradle-6.6-bin.zip && \
mkdir /opt/gradle && \
unzip -d /opt/gradle gradle-6.6-bin.zip
ENV PATH=$PATH:/opt/gradle/gradle-6.6/bin \
JAVA_HOME=/usr/lib/jvm/java-11
ENV GIMME_GO_VERSION=1.13.14
RUN mkdir -p /gimme && curl -sL \
https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | \
HOME=/gimme bash >> /etc/profile.d/gimme.sh
ENV GOPATH="/go" GOBIN="/usr/bin" GO111MODULE="on"
# Install persistent go packages
RUN set -x && \
mkdir -p /go && \
source /etc/profile.d/gimme.sh && \
go get -v golang.org/x/tools/cmd/goimports@d5fe738 && \
go get -v mvdan.cc/sh/v3/cmd/[email protected] && \
go get -v k8s.io/code-generator/cmd/[email protected] && \
go get -v k8s.io/code-generator/cmd/[email protected] && \
go get -v k8s.io/kube-openapi/cmd/openapi-gen@30be4d1 && \
go get -v github.com/golang/protobuf/protoc-gen-go@1643683 && \
go get -v k8s.io/code-generator/cmd/[email protected] && \
go get -v github.com/securego/gosec/v2/cmd/gosec@0ce48a5 && \
go get -v sigs.k8s.io/controller-tools/cmd/[email protected] && \
go clean -cache -modcache
RUN set -x && \
source /etc/profile.d/gimme.sh && \
go get -v -u github.com/mattn/goveralls@21feffdfd && \
go get -v -u github.com/golang/mock/[email protected] && \
go get -v -u github.com/rmohr/mock/[email protected] && \
go get -v -u github.com/rmohr/go-swagger-utils/[email protected] && \
go get -v -u github.com/onsi/ginkgo/[email protected] && \
go clean -cache -modcache
RUN set -x && \
source /etc/profile.d/gimme.sh && \
git clone https://github.com/kubernetes/test-infra.git && \
cd /test-infra && \
git checkout fd0699b906b0593a33ba2bddd3b1ae8822f42dd8 && \
cd /test-infra/robots/pr-creator && \
go install && \
cd /test-infra/robots/issue-creator && \
go install && \
cd /test-infra/robots/pr-labeler && \
go install && \
go clean -cache -modcache -r && \
rm -rf /test-infra && \
rm -rf /go && mkdir /go
RUN pip3 install --upgrade j2cli operator-courier==2.1.11
ENV SONOBUOY_VERSION=0.19.0
RUN set -x && \
wget https://github.com/vmware-tanzu/sonobuoy/releases/download/v${SONOBUOY_VERSION}/sonobuoy_${SONOBUOY_VERSION}_linux_${SONOBUOY_ARCH}.tar.gz && \
tar xvf sonobuoy_${SONOBUOY_VERSION}_linux_${SONOBUOY_ARCH}.tar.gz && \
chmod +x sonobuoy && \
mv sonobuoy /usr/bin
COPY rsyncd.conf /etc/rsyncd.conf
COPY entrypoint.sh /entrypoint.sh
COPY create_bazel_cache_rcs.sh /create_bazel_cache_rcs.sh
RUN curl -L -o /usr/bin/bazel https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-${BAZEL_ARCH} && chmod u+x /usr/bin/bazel
ENTRYPOINT [ "/entrypoint.sh" ]