Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using dockerfiles instead of building directly from running containers #19907

Open
1 task done
muditsingal opened this issue Apr 28, 2024 · 0 comments
Open
1 task done
Labels
status/triage Needs triage

Comments

@muditsingal
Copy link

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Other

Description

Hi, I would like to suggest including information on why we should use dockerfiles instead of building images from containers. I have found articles suggesting that we can build images by:

  1. Running a container from a stable base image.
  2. Making some changes (such as installing packages inside the container)
  3. Commit the changed container as a new image that can be used for further development.

While this method is powerful, it can easily create confusion among developers about how this image was built and the underlying layers. Thus, the best practice would be to test changes to an image in a container but eventually change the base dockerfile to build a new image, as it is easier to maintain and understand.

Location

https://docs.docker.com/develop/dev-best-practices/

Suggestion

No response

@muditsingal muditsingal added the status/triage Needs triage label Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/triage Needs triage
Projects
None yet
Development

No branches or pull requests

1 participant