Some code refactoring for the dockerfiles.#14
Some code refactoring for the dockerfiles.#14beardstack wants to merge 11 commits intooxen-io:mainfrom
Conversation
These ones are privileged Co-authored-by: Jason Rhinelander <jason@imaginary.ca>
|
Mostly minor things left as comments; the cleanup/refactoring here looks good to me overall. Thanks for your efforts, @beardstack ! |
|
You're welcome. I'd like to help more on the docker side of things as I build my own systems. For now I'm trying to make it work with user namespaces but I'm having some trouble. I don't really like how the images is pancaked with a bunch of tools. It's best practice to separate apps in different containers and run containers separately (nginx, iptables, fail2ban, cron). |
Co-authored-by: Jason Rhinelander <jason@imaginary.ca>
Co-authored-by: Jason Rhinelander <jason@imaginary.ca>
iptables and fail2ban will break down given how lokinet would work in a docker setup. in general, i do not know what docker does with networking that allows fail2ban and iptables to continue working as intended but it likely would conflict with lokinet. this is a continual issue with docker, the way they do networking is blackbox from the perspective of layer 3 (it is "easier" for end users i hear but it has made my life harder) |
I definitely does make thing a bit "stranger" and more complicated until it's set up and working. I run my fail2ban containers externally from my services.. for instance typically by volume sharing/mounting log files. Benefits would really depend on the use case but generally it would allow a tighter and more granular security for the containers. In a way, since I run multiple services on a single host.it also simplifies management a fair bit. |
| @@ -1,3 +1,4 @@ | |||
| #What is this ip? | |||
There was a problem hiding this comment.
please make separate issues for each of these questions instead of in a git commit on a PR so they are tracked and we can close them as they get addressed.
There was a problem hiding this comment.
Sounds good! I figured out a number of things on my own but I'm not sure how to close the PR - Please do if you can.
Improving the docker builds by removing bloat, removing extra RUN commands, unnecessary apps, passing chmod arguments to COPY/ADD directives directly instead of extra RUN 'chmod' commands and cleaning up repos resulting in a base image of 200MB image vs 274MB.