When I created the image wrote what was done in the Dockerfile :

 FROM ubuntu 

Now I realized that it would be better to do this:

 FROM ubuntu ENV LANG en_US.UTF-8 CMD ["/bin/bash"] 

Can I somehow make such a change without losing the content in the ready-made image ?

  • Do you want to add ENV and CMD ? - Mikhail Vaysman
  • yes ............................. - faoxis

1 answer 1

Make a new Dockerfile and specify the previous image in the FROM directive. This will add a new layer and create a new image with your changes.

  • An image to call the same and push into the same repository? - faoxis
  • And what exactly do you want to get? - Mikhail Vaysman
  • I want to change the current repository to docker hub . - faoxis
  • Then the answer is yes. - Mikhail Vaysman