Remove code duplication in Dockerfile
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 542
- PR merge metrics
- No merged PRs in 30d
Description
All the Dockerfiles for the different binaries are nearly identical
e.g.
https://github.com/kubeflow/katib/blob/master/cmd/metricscollector/Dockerfile
https://github.com/kubeflow/katib/blob/master/cmd/studyjobcontroller/Dockerfile
Instead of duplicating the Dockerfiles can we just have a single Dockerfile that takes a BuildArg specifying the binary?
Contributor guide
Research direction
Start by comparing cmd/metricscollector/Dockerfile and cmd/studyjobcontroller/Dockerfile, then inspect the other binary Dockerfiles for the shared pattern. Determine how each image selects its binary and how builds are invoked. Done means the duplicated Dockerfiles are replaced by a shared Dockerfile accepting a BuildArg for the binary, with all affected images still buildable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- build-system, devops
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100