jpetazzo / pipework

Software-Defined Networking tools for LXC (LinuX Containers)
Apache License 2.0
4.22k stars 726 forks source link

docker run for busybox udhcpc: add --rm flag #248

Open osmith42 opened 2 years ago

osmith42 commented 2 years ago

Use --rm with "docker run", so the remaining container does not consume disk space after the command is done.

jpetazzo commented 7 months ago

Hi!

Thanks for the PR. I had missed the original notification a few years back 😅

I'm a bit on the fence about that one, because if something goes wrong, the container is going to be removed, which will prevent looking at its logs, and will be annoying from a debugging perspective. What do you think?

osmith42 commented 7 months ago

Personally I think creating a container that does not get removed every time the script runs, is worse than that. I would suggest to rather redirect the log to a file for a better debugging experience. And maybe add a check that ensures udhcpc is actually running, and if it isn't, then print the log.

With that being said, I won't work on this pull request further, so feel free to merge or close it as you prefer :slightly_smiling_face:

Thanks for making pipework!