3 ms·
Can't you via `docker exec` or do I misunderstand the ask?
by dvtrn 8y ago
Can't you via `docker exec` or do I misunderstand the ask?
- deathanatos 8y agoYou can't `docker exec` unless the container is running, so you first need to `docker run` something. (Like an infinite sleep loop, like `bash -c 'while true; sleep 60; done'`.) You can create images via just `docker`, but it's a wee bit hard to do, IMO. IIRC, the docker command that captures the resulting image will by default also change the entrypoint to whatever the `run` was, which isn't helpful.
- heavenlyblue 8y ago>> You can create images via just `docker`, but it's a wee bit hard to do, IMO. Also if you do that, then you can't edit the ENTRYPOINT without adding another layer because docker can't edit the respective json in the .tar file directly. As in - it has the documented functionality to do so in the "POST /commit" API, but that would never work and that parameter will be simply ignored.