Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

148
Views
Docker commit alterations of a built image

I 've built an image using A Dockerfile and I've noticed an error in the created image. I've then run the image and fixed the error.

Now I would like to know if the correct flow is to commit the changes to the built image, or create a new image.

Thanks

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

If a working image is all you want, then committing it is fine. You will then get a new image that includes your fix.

However, the benefit of having a Dockerfile is that your build is reproducible, so if your ever want to share the image with someone else, or foresee yourself rebuilding it, you should probably maintain the Dockerfile.

about 4 years ago · Santiago Trujillo Report

0

Basically you have two options:

  • Fix your Dockerfile and rebuild it, that's the reason we have Dockerfile, from which an expected/correct image can be built by anybody at anywhere
  • Run a container from your incorrect image and fix it, then commit back to the image. You can choose this option when your building process is extremely long but what you need is to do a quick/small fix. But remember to always fix Dockerfile, which is the "definetion" of your image and I believe you don't want to leave any kind of "bug" in it.
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!