You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having walt images generated from a Dockerfile allows easier maintenance (e.g. regenerate the image when the base image is updated).
However, using walt image shell can be handy for more interactive modification.
Thus, having walt image shell auto-generate a Dockerfile could be handy.
We can imagine the following:
when walt image shell <image> is started, we check if a file [image_root]/etc/walt/Dockerfile exists. If not, we initialize it with a single line FROM <docker_image_id>.
By using a bash hook (see here and here), we catch all commands typed during the shell session, and append them as RUN commands in /etc/walt/Dockerfile.
Notes:
we might have to restrict this feature to images embedding the bash interpreter (unless we are able to implement such a hook with a basic sh interpreter)
the generated Dockerfile would probably have to be reworked for real usage (e.g. if you edited a file with vi, having RUN vi <file> in the Dockerfile will probably not be enough explicit). But it would probably be a useful starting point.
The text was updated successfully, but these errors were encountered:
Having walt images generated from a Dockerfile allows easier maintenance (e.g. regenerate the image when the base image is updated).
However, using
walt image shell
can be handy for more interactive modification.Thus, having walt image shell auto-generate a Dockerfile could be handy.
We can imagine the following:
walt image shell <image>
is started, we check if a file[image_root]/etc/walt/Dockerfile
exists. If not, we initialize it with a single lineFROM <docker_image_id>
.RUN
commands in/etc/walt/Dockerfile
.Notes:
bash
interpreter (unless we are able to implement such a hook with a basicsh
interpreter)vi
, havingRUN vi <file>
in the Dockerfile will probably not be enough explicit). But it would probably be a useful starting point.The text was updated successfully, but these errors were encountered: