-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker - Tikv - update version (#2112)
* update version * increase timeout
- Loading branch information
1 parent
4f94338
commit 2447183
Showing
5 changed files
with
72 additions
and
64 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
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 |
---|---|---|
@@ -1,40 +1,18 @@ | ||
FROM marketplace.gcr.io/google/debian11:latest as builder | ||
FROM marketplace.gcr.io/google/c2d-debian11:latest as builder | ||
|
||
RUN apt-get update \ | ||
&& apt-get install curl perl build-essential cmake git unzip -y --no-install-recommends | ||
ENV GOLANG_VERSION=1.16 | ||
ENV GOLANG_VERSION=1.20 | ||
RUN curl -L https://golang.org/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz -o /golang.tar.gz &&tar -xzf /golang.tar.gz -C /usr/local | ||
ENV PATH /usr/local/go/bin:$PATH | ||
|
||
ENV TIKV_APP_VERSION=5.3.2 | ||
|
||
#build tikv | ||
WORKDIR /tikv | ||
|
||
RUN curl -L https://github.com/tikv/tikv/archive/refs/tags/v${TIKV_APP_VERSION}.tar.gz -o ./tikv.tar.gz && tar -xzf ./tikv.tar.gz && mv ./tikv-*/* ./ | ||
|
||
ENV LIBRARY_PATH /usr/local/lib:$LIBRARY_PATH | ||
ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path --default-toolchain none -y | ||
ENV PATH /root/.cargo/bin/:$PATH | ||
|
||
RUN rustup self update \ | ||
&& rustup set profile minimal \ | ||
&& rustup default $(cat "rust-toolchain") | ||
|
||
ENV CARGO_BUILD_JOBS 32 | ||
RUN lscpu | ||
|
||
RUN make build_dist_release | ||
|
||
#install jq for pd-ctl | ||
RUN cd / && \ | ||
curl -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -o jq && \ | ||
chmod +x jq | ||
|
||
#build pd | ||
ENV PD_APP_VERSION=5.3.2 | ||
ENV PD_APP_VERSION=6.5.1 | ||
|
||
RUN mkdir -p /go/src/github.com/tikv/pd | ||
WORKDIR /go/src/github.com/tikv/pd | ||
|
@@ -53,17 +31,43 @@ RUN export GO111MODULE=on \ | |
&& go get github.com/pingcap/tidb/store/[email protected] \ | ||
&& go build tikvtest.go | ||
|
||
# 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 | ||
|
||
ENV TIKV_APP_VERSION=6.5.1 | ||
|
||
#build tikv | ||
WORKDIR /tikv | ||
|
||
RUN curl -L https://github.com/tikv/tikv/archive/refs/tags/v${TIKV_APP_VERSION}.tar.gz -o ./tikv.tar.gz && tar -xzf ./tikv.tar.gz && mv ./tikv-*/* ./ | ||
|
||
ENV LIBRARY_PATH /usr/local/lib:$LIBRARY_PATH | ||
ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path --default-toolchain none -y | ||
ENV PATH /root/.cargo/bin/:$PATH | ||
|
||
RUN rustup self update \ | ||
&& rustup set profile minimal \ | ||
&& rustup default $(cat "rust-toolchain") | ||
|
||
ENV CARGO_BUILD_JOBS 32 | ||
|
||
RUN make build_dist_release | ||
|
||
#copy inferno license to /usr/src | ||
RUN cp -r $(find /root/.cargo/registry -name "inferno-*" -type d) /usr/src/ | ||
|
||
FROM marketplace.gcr.io/google/debian11:latest | ||
FROM marketplace.gcr.io/google/c2d-debian11:latest | ||
|
||
ENV PD_ENDPOINT 127.0.0.1:2379 | ||
|
||
#fix security issues | ||
RUN apt-get update \ | ||
&& apt-get install --no-install-recommends -yqq \ | ||
curl openssl zlib1g libgnutls30 libc6 libc-bin libtirpc3 libtirpc-common libpcre2-8-0 libssl1.1 \ | ||
curl openssl zlib1g libgnutls30 libc6 libc-bin libtirpc3 libtirpc-common libpcre2-8-0 libssl1.1 libtasn1-6 \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
|
@@ -79,6 +83,6 @@ COPY --from=builder /jq /usr/local/bin/jq | |
COPY --from=builder /tikvtest/tikvtest /tikvtest | ||
|
||
EXPOSE 2379 2380 20160 20180 | ||
ENV C2D_RELEASE 5.3.2 | ||
ENV C2D_RELEASE 6.5.1 | ||
|
||
CMD ["/tikv-server"] |
File renamed without changes.
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 |
---|---|---|
|
@@ -10,28 +10,6 @@ ENV GOLANG_VERSION={{ $golang.Version }} | |
RUN curl -L https://golang.org/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz -o /golang.tar.gz &&tar -xzf /golang.tar.gz -C /usr/local | ||
ENV PATH /usr/local/go/bin:$PATH | ||
|
||
ENV TIKV_APP_VERSION={{ $tikv.Version }} | ||
|
||
#build tikv | ||
WORKDIR /tikv | ||
|
||
RUN curl -L https://github.com/tikv/tikv/archive/refs/tags/v${TIKV_APP_VERSION}.tar.gz -o ./tikv.tar.gz && tar -xzf ./tikv.tar.gz && mv ./tikv-*/* ./ | ||
|
||
ENV LIBRARY_PATH /usr/local/lib:$LIBRARY_PATH | ||
ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path --default-toolchain none -y | ||
ENV PATH /root/.cargo/bin/:$PATH | ||
|
||
RUN rustup self update \ | ||
&& rustup set profile minimal \ | ||
&& rustup default $(cat "rust-toolchain") | ||
|
||
ENV CARGO_BUILD_JOBS 32 | ||
RUN lscpu | ||
|
||
RUN make build_dist_release | ||
|
||
#install jq for pd-ctl | ||
RUN cd / && \ | ||
curl -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -o jq && \ | ||
|
@@ -57,6 +35,32 @@ RUN export GO111MODULE=on \ | |
&& go get github.com/pingcap/tidb/store/[email protected] \ | ||
&& go build tikvtest.go | ||
|
||
# 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 | ||
|
||
ENV TIKV_APP_VERSION={{ $tikv.Version }} | ||
|
||
#build tikv | ||
WORKDIR /tikv | ||
|
||
RUN curl -L https://github.com/tikv/tikv/archive/refs/tags/v${TIKV_APP_VERSION}.tar.gz -o ./tikv.tar.gz && tar -xzf ./tikv.tar.gz && mv ./tikv-*/* ./ | ||
|
||
ENV LIBRARY_PATH /usr/local/lib:$LIBRARY_PATH | ||
ENV LD_LIBRARY_PATH /usr/local/lib:$LD_LIBRARY_PATH | ||
|
||
RUN curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path --default-toolchain none -y | ||
ENV PATH /root/.cargo/bin/:$PATH | ||
|
||
RUN rustup self update \ | ||
&& rustup set profile minimal \ | ||
&& rustup default $(cat "rust-toolchain") | ||
|
||
ENV CARGO_BUILD_JOBS 32 | ||
|
||
RUN make build_dist_release | ||
|
||
#copy inferno license to /usr/src | ||
RUN cp -r $(find /root/.cargo/registry -name "inferno-*" -type d) /usr/src/ | ||
|
||
|
@@ -67,7 +71,7 @@ ENV PD_ENDPOINT 127.0.0.1:2379 | |
#fix security issues | ||
RUN apt-get update \ | ||
&& apt-get install --no-install-recommends -yqq \ | ||
curl openssl zlib1g libgnutls30 libc6 libc-bin libtirpc3 libtirpc-common libpcre2-8-0 libssl1.1 \ | ||
curl openssl zlib1g libgnutls30 libc6 libc-bin libtirpc3 libtirpc-common libpcre2-8-0 libssl1.1 libtasn1-6 \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
|
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