[Code scan] Make Docker builds use the checked-out source instead of cloning mutable upstream
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- docker, python
- Domain
- build-system, devops
Research direction
Start by reading Dockerfile and Dockerfile.main at the referenced build steps, then build the images from the checked-out repository context. Verify that the image installs the local source rather than cloning mutable upstream code, and that local or commit-specific changes are reflected in the resulting image.
Written by the indexing model from the issue text.
Description
This issue is part of a Codex global repository scan.
Problem:
Both Dockerfiles ignore the local build context and run git clone https://github.com/deepmodeling/DeePTB.git, then install whatever branch state GitHub serves at build time.
Code references:
https://github.com/deepmodeling/deeptb/blob/86c60c73996f0dd961c3138f2e88424382cb734e/Dockerfile#L33-L35
https://github.com/deepmodeling/deeptb/blob/86c60c73996f0dd961c3138f2e88424382cb734e/Dockerfile.main#L34-L36
Impact:
Building this commit can produce an image from different source code, and local changes cannot be tested in Docker. This makes Docker builds non-reproducible for PRs and release commits.
Suggested fix:
Use COPY . /DeePTB and install from the checked-out source, or pin the clone to the intended commit/tag via build args.
- Dominant language
- Python
- Stars
- 122
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from deepmodeling/DeePTB
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
deepmodeling/DeePTB#363 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
deepmodeling/DeePTB#362 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
deepmodeling/DeePTB#361 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
deepmodeling/DeePTB#359 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
deepmodeling/DeePTB#358 ·
All issues in deepmodeling/DeePTB
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100