forked from tikv/tikv
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #329 from CalvinNeo/v2/merge-7.1-freeze
Merge TiKV release-7.1(eaebf9a)
- Loading branch information
Showing
149 changed files
with
6,039 additions
and
1,508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# This Docker image contains a minimal build environment for TiKV | ||
# | ||
# It contains all the tools necessary to reproduce official production builds of TiKV | ||
|
||
# We need to use CentOS 7 because many of our users choose this as their deploy machine. | ||
# Since the glibc it uses (2.17) is from 2012 (https://sourceware.org/glibc/wiki/Glibc%20Timeline) | ||
# it is our lowest common denominator in terms of distro support. | ||
|
||
# Some commands in this script are structured in order to reduce the number of layers Docker | ||
# generates. Unfortunately Docker is limited to only 125 layers: | ||
# https://github.com/moby/moby/blob/a9507c6f76627fdc092edc542d5a7ef4a6df5eec/layer/layer.go#L50-L53 | ||
|
||
# We require epel packages, so enable the fedora EPEL repo then install dependencies. | ||
# Install the system dependencies | ||
# Attempt to clean and rebuild the cache to avoid 404s | ||
|
||
# To avoid rebuilds we first install all Cargo dependencies | ||
|
||
|
||
# The prepare image avoid ruining the cache of the builder | ||
FROM centos:7.6.1810 as builder | ||
|
||
RUN yum install -y epel-release && \ | ||
yum clean all && \ | ||
yum makecache | ||
|
||
RUN yum install -y centos-release-scl && \ | ||
yum install -y \ | ||
devtoolset-8 \ | ||
perl cmake3 && \ | ||
yum clean all | ||
|
||
# CentOS gives cmake 3 a weird binary name, so we link it to something more normal | ||
# This is required by many build scripts, including ours. | ||
RUN ln -s /usr/bin/cmake3 /usr/bin/cmake | ||
ENV LIBRARY_PATH /usr/local/lib:$LIBRARY_PATH | ||
ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH | ||
|
||
# Install protoc | ||
RUN curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip" | ||
RUN unzip protoc-3.15.8-linux-x86_64.zip -d /usr/local/ | ||
ENV PATH /usr/local/bin/:$PATH | ||
|
||
# Install Rustup | ||
RUN curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path --default-toolchain none -y | ||
ENV PATH /root/.cargo/bin/:$PATH | ||
|
||
# Install the Rust toolchain | ||
WORKDIR /tikv | ||
COPY rust-toolchain ./ | ||
RUN rustup self update \ | ||
&& rustup set profile minimal \ | ||
&& rustup default $(cat "rust-toolchain") | ||
|
||
RUN cargo install cargo-nextest --locked | ||
|
||
ENTRYPOINT ["sh", "-c", "source /opt/rh/devtoolset-8/enable && \"$@\"", "-s"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.