I've created a docker image from Dockerfile, and now I want to add another application to it. My question is, which is the best practice for updating the docker image:
- Run a container from the docker image, install the package inside the container, and then get an image from that container.
- Update Dockerfile with the corresponding command and rebuild the image. Which of these is the best practice?