I’m new to both docker and this forum, I’ve searched but cannot find this feature request elsewhere.
Request in brief:
I’d like to suggest a feature which would enable a docker user to record the commands issued during a docker container session in Dockerfile format. Perhaps you’d only bother recording commands which result in file system changes and note those file system changes (in docker diff format?) as Dockerfile comments?
I believe that implementation of this feature request would greatly improve the overall value of docker and make the Dockerfile and ‘docker commit’ features far more coherent in the way they operate together.
I am aware of a project that already exists to do this, so perhaps you could work with them to ‘insource’ this?
At first I was confused as to why I’d bother creating a Dockerfile when I can simply build up a docker container and commit this to an image. I had many of the same questions and considerations as the OP of this question on StackOverflow. Now I understand that a Dockerfile helps transcend base image updates and updates to other components I may install in a container.
Dockerfiles and ‘docker commit’ do seem to be ambiguous features of docker. Generally docker’s documentation completely omits information on benefits of using different docker features and reasoning for using certain features and best practices. This may be intentional, but is extremely annoying for new starters and may be unnecessarily slowing the uptake of docker by new users. I’ve had a lot of time to read recently - but if I were busy, I would have closed the browser on docker ages ago and simply continued to use VMs.