Skip to content

build: update docker files#17908

Merged
ti-chi-bot[bot] merged 5 commits intotikv:masterfrom
wuhuizuo:wuhuizuo/issue17894
Jan 7, 2025
Merged

build: update docker files#17908
ti-chi-bot[bot] merged 5 commits intotikv:masterfrom
wuhuizuo:wuhuizuo/issue17894

Conversation

@wuhuizuo
Copy link
Contributor

@wuhuizuo wuhuizuo commented Nov 28, 2024

This pull request includes significant updates to the Dockerfile and related build processes for TiKV. The main changes involve switching the base image from CentOS7 (EOL) to Rocky Linux 8, updating the build steps, and simplifying the Dockerfile structure.

Dockerfile updates:

  • Switched the base image from CentOS to Rocky Linux and updated the package installation process to use dnf instead of yum.
  • Added build instructions and prerequisites comments at the beginning of the Dockerfile to guide users on how to build the image.
  • Reorganized the Dockerfile to use multi-stage builds, separating the building and final image stages for a cleaner and more efficient build process.
  • Updated the installation process for protoc and the Rust toolchain, including setting up the environment variables and paths.

This Dockerfile is for development build to, the production build image will still be CentOS7 based.

Dockerfile.test updates:

  • Updated the base image to Rocky Linux and modified the package installation process accordingly.
  • Revised the installation steps for protoc and the Rust toolchain to align with the main Dockerfile.
  • Ensured the installation of cargo-nextest to a specific version for consistency in the test environment.

Makefile update:

  • Simplified the docker_shell target to use bash instead of /bin/bash for consistency and simplicity.

What is changed and how it works?

Issue Number: Close #17894

What's Changed:

build: update Dockerfile for build and test

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    ~# docker build -t tikv -f Dockerfile .
    ~# docker run -it --rm --entrypoint sh  tikv
    sh-5.1# /tikv-server -V
    TiKV
    Release Version:   8.5.0-alpha
    Edition:           Community
    Git Commit Hash:   4667725f8916b84da7ab68861616c2d250154196
    Git Commit Branch: wuhuizuo/issue17894
    UTC Build Time:    2025-01-07 07:11:16
    Rust Version:      rustc 1.77.0-nightly (89e2160c4 2023-12-27)
    Enable Features:   memory-engine pprof-fp jemalloc mem-profiling portable sse test-engine-kv-rocksdb test-engine-raft-raft-engine trace-async-tasks openssl-vendored
    Profile:           dist_release
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Release note

None

- Dockerfile
- Dockerfile.test

Signed-off-by: wuhuizuo <wuhuizuo@126.com>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed dco-signoff: yes Indicates the PR's author has signed the dco. contribution This PR is from a community contributor. labels Nov 28, 2024
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 28, 2024

Hi @wuhuizuo. Thanks for your PR.

I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ti-chi-bot ti-chi-bot bot added needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 28, 2024
@wuhuizuo
Copy link
Contributor Author

/check-issue-triage-complete

@wuhuizuo wuhuizuo marked this pull request as draft November 28, 2024 12:52
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 28, 2024
Signed-off-by: wuhuizuo <wuhuizuo@126.com>
ti-chi-bot and others added 2 commits January 7, 2025 15:50
install cargo-nextest with given version to adjust the rust version.

Signed-off-by: wuhuizuo <wuhuizuo@126.com>
@wuhuizuo wuhuizuo marked this pull request as ready for review January 7, 2025 08:21
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 7, 2025
@wuhuizuo
Copy link
Contributor Author

wuhuizuo commented Jan 7, 2025

/cc @Connor1996 @dveeden

PTAL

@ti-chi-bot ti-chi-bot bot requested a review from Connor1996 January 7, 2025 09:13
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 7, 2025

@wuhuizuo: GitHub didn't allow me to request PR reviews from the following users: dveeden.

Note that only tikv members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

/cc @Connor1996 @dveeden

PTAL

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@wuhuizuo
Copy link
Contributor Author

wuhuizuo commented Jan 7, 2025

/cc @LykxSassinator

@ti-chi-bot ti-chi-bot bot requested a review from LykxSassinator January 7, 2025 09:14
Signed-off-by: wuhuizuo <wuhuizuo@126.com>
Copy link
Contributor

@LykxSassinator LykxSassinator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for your contribution.

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 7, 2025
@LykxSassinator
Copy link
Contributor

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Jan 7, 2025
@ti-chi-bot ti-chi-bot bot removed the needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. label Jan 7, 2025
Copy link
Member

@Connor1996 Connor1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 7, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Connor1996, LykxSassinator

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [Connor1996,LykxSassinator]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jan 7, 2025
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jan 7, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-07 10:37:40.143580457 +0000 UTC m=+263603.432412183: ☑️ agreed by LykxSassinator.
  • 2025-01-07 23:47:01.34664044 +0000 UTC m=+310964.635472151: ☑️ agreed by Connor1996.

@ti-chi-bot ti-chi-bot bot merged commit 02ae1f6 into tikv:master Jan 7, 2025
1 check passed
@ti-chi-bot ti-chi-bot bot added this to the Pool milestone Jan 7, 2025
@wuhuizuo wuhuizuo deleted the wuhuizuo/issue17894 branch January 9, 2025 07:09
xzhangxian1008 pushed a commit to xzhangxian1008/tikv that referenced this pull request Feb 8, 2025
close tikv#17894

build: update Dockerfile for build and test

Signed-off-by: wuhuizuo <wuhuizuo@126.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Signed-off-by: xzhangxian1008 <xzhangxian@foxmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved contribution This PR is from a community contributor. dco-signoff: yes Indicates the PR's author has signed the dco. lgtm ok-to-test Indicates a PR is ready to be tested. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CentOS 7 EOL affecting docker build

4 participants