-
Notifications
You must be signed in to change notification settings - Fork 171
/
Dockerfile-prow-env
72 lines (57 loc) · 2.58 KB
/
Dockerfile-prow-env
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
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM debian:bullseye
LABEL maintainer="[email protected]"
# add env we can debug with the image name:tag
ARG IMAGE_ARG
ENV IMAGE=${IMAGE_ARG}
RUN apt-get update -y
RUN apt-get -y install \
wget make cmake python3 python3-pip python3-venv pkg-config coreutils \
zlib1g-dev curl libtool automake zip time rsync ninja-build \
git bash-completion jq default-jdk python3-distutils libicu-dev libbrotli-dev
# install nodejs, which is needed for integration tests
RUN sh -c 'curl -sL https://deb.nodesource.com/setup_20.x | bash -'
RUN apt-get install -y nodejs
# install Bazelisk
RUN wget -O /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-linux-amd64 && \
chmod +x /usr/local/bin/bazelisk
# install clang-14 and associated tools (new envoy)
# see https://apt.llvm.org/ for exhaustive list of all llvm related packages
RUN wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add - && \
echo "deb https://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-14 main" >> /etc/apt/sources.list && \
apt-get update && \
apt-get install -y llvm-14 llvm-14-dev libclang-14-dev clang-14 \
lld-14 clang-tools-14 clang-format-14 libc++-dev xz-utils libclang-rt-14-dev
ENV CC clang-14
ENV CXX clang++-14
# install golang and setup Go standard envs
ENV GOPATH /go
ENV PATH /usr/local/go/bin:$PATH
ENV PATH $GOPATH/bin:$PATH
ENV GO_TARBALL "go1.22.5.linux-amd64.tar.gz"
RUN wget -q "https://go.dev/dl/${GO_TARBALL}" && \
tar xzf "${GO_TARBALL}" -C /usr/local && \
rm "${GO_TARBALL}"
# Install buildifier
RUN go install github.com/bazelbuild/buildtools/buildifier@latest
RUN pip install pipx
# Install beautysh
RUN pipx install beautysh
# install gcloud package
RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz > /tmp/google-cloud-sdk.tar.gz
RUN mkdir -p /usr/local/gcloud \
&& tar -C /usr/local/gcloud -xvf /tmp/google-cloud-sdk.tar.gz \
&& /usr/local/gcloud/google-cloud-sdk/install.sh
ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin