-
Notifications
You must be signed in to change notification settings - Fork 286
/
Dockerfile.centos
50 lines (39 loc) · 2 KB
/
Dockerfile.centos
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
FROM centos:7
# Version from build arguments
ARG VERSION
# Labels used by Docker
LABEL "io.istio.repo"="https://github.com/istio/tools"
LABEL "io.istio.version"="${VERSION}"
# hadolint ignore=DL3031,DL3033
RUN yum install -y centos-release-scl epel-release && \
yum update -y && \
yum install -y fedpkg sudo devtoolset-7-gcc devtoolset-7-gcc-c++ \
devtoolset-7-binutils java-1.8.0-openjdk-headless rsync \
rh-git218 wget unzip which make cmake3 patch ninja-build \
devtoolset-7-libatomic-devel openssl python27 libtool autoconf && \
yum clean all
# Install bazel
RUN curl -o /usr/local/bin/bazel -L https://github.com/bazelbuild/bazelisk/releases/download/v1.1.0/bazelisk-linux-amd64 && \
chmod +x /usr/local/bin/bazel
RUN ln -s /usr/bin/cmake3 /usr/bin/cmake
RUN echo "/opt/rh/httpd24/root/usr/lib64" > /etc/ld.so.conf.d/httpd24.conf && \
ldconfig
# We need gsutil to push/pull
ADD https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-265.0.0-linux-x86_64.tar.gz /tmp
RUN tar -xzvf "/tmp/google-cloud-sdk-265.0.0-linux-x86_64.tar.gz" -C /usr/local
ENV LLVM_RELEASE=clang+llvm-10.0.0-x86_64-linux-centos7
# hadolint ignore=DL4006
RUN curl -fsSL --output ${LLVM_RELEASE}.tar.xz http://storage.googleapis.com/getenvoy-package/clang-toolchain/a79bbfea57c05b5cd2708ab432192be0e187e074/${LLVM_RELEASE}.tar.xz && \
tar Jxf ${LLVM_RELEASE}.tar.xz && \
mv ./${LLVM_RELEASE} /opt/llvm && \
chown -R root:root /opt/llvm && \
rm ./${LLVM_RELEASE}.tar.xz && \
echo "/opt/llvm/lib" > /etc/ld.so.conf.d/llvm.conf && \
ldconfig
ENV PATH=/opt/llvm/bin:/usr/local/google-cloud-sdk/bin:$PATH
# Sha matches DEPS in the root of the wee8 tar ball in envoy's repository_locations.bzl
# hadolint ignore=DL3003
RUN cd /tmp && git clone https://gn.googlesource.com/gn && cd gn && \
git checkout 39a87c0b36310bdf06b692c098f199a0d97fc810 && \
python build/gen.py && ninja -C out && cp out/gn /usr/bin && rm -rf /tmp/gn
ENV HOME=/home