Cleaned Dockerfile CMD entrypoints to make it easier to extend or buil…#590
Cleaned Dockerfile CMD entrypoints to make it easier to extend or buil…#590pathtofile wants to merge 2 commits intosickcodes:masterfrom
Conversation
|
Hey @pathtofile this is great thanks for this so far. I think this is almost there, I can make this into a wrapper so we can use For QEMU extra commands, I added For any of the other major variables, I added the ability to specify own, eg, Importantly, these can be added as environment variables, as opposed to extra CMD args. From memory, I avoided adding separate shell script, looong ago, as I wanted to keep everything inside the Dockerfile, without the need of any COPY. Mostly for cache reasons, and also that the Dockerfile can be pasted anywhere and go. Give me a bit to go over the scenarios in my head. The other way anyone can currently (using docker args) would be to simply overwrite, which is what I do with most things:
I can recall moving the serial generators to their own repo, and git pull/submodule, so I did violate the above rule already about keeping everything inside Dockerfile. Plus we also git clone the repo itself now. More evidence for merging, after I added serial numbers, internet was required if wanted set serial etc. Caveat to the above sentence I recall "hot swapping" serial numbers didn't affect iServices on a future boot when changing serial back. I am fine with an Entrypoint standalone version tho, and adding persistent Lemme go over some stuff but yeah are you on Discord? |
Cleaned Dockerfile CMD entrypoints to make it easier to extend or build on top of built image.
In some situations you might want to run extra setup inside the container prior to qemu, or build on top of the built docker image using e.g.
FROM sickcodes/docker-osx:naked.Without this PR, when you change the CMD you'd need to also re-implement all of the checks and setup done by the original CMD.
With this PR, you can first call your own script first, then call
bash -c entrypoint.shafter your code, and optionally have some post-QEMU code after the VM has shut down.