-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite to go #445
Comments
I am interested in helping rewrite podman-compose in Go as CLI plugin for Podman (similar to docker compose v2), so that it can be more pluggable with other Podman library functionality, such as systemd generation, etc. |
the way "pluggable" works in docker can be done in any language because it's just an executable placed in |
I used "pluggable" a little loosely (incorrectly). What I meant is allowing more flexibility for re-use between Podman libraries and this project. Here are the primary benefits of rewriting
|
For my selfish reason, I will end up duplicating some of the logic of |
docker-compose was implemented in python, yet I did not found any value for using their parser (I'm using plain PyYaml).
You can do this today. A pod or a container created by podman-compose can be passed to I'm working in better integration between |
I prefer minimal setup on host machine running podman. I am using alpinelinux that does not even have python installed. |
Not exactly. Today, you have to do it in two steps:
I can understand this for Python, but since I would like to rewrite the compose -> podman translation in Go, it makes sense to use the |
I understand that my motivation for this big change comes from something that may not be of interest to many users. But before I go and re-implement in Go, I wanted to see if this project would have interest in sharing that effort. But this can be revisited once I actually have some code to show (maybe forking off |
Make it podman-compose up --no-start Maybe this week end I'll automate that using a systemd command inside Back in the good old unix days composing multiple cli commands is not considered something bad. |
@matejsp I understand the value of this use case, I myself use busybox image for most of the tests. Having said that, I would like to point something regarding alpine, libmusl ..etc. I know that alpine, musl (as opposed to gnu libc) and statically linked small binaries is marketed as faster, minimal and secure because the claimed smaller attack surface. This is no true at all, I personally don't trust it for production environment (feel free to disagree with me, this is just my personal preference). Docker have shipped alpine with empty root password multiple times and they keep opening this loophole even after it's reported to them (for example in 2015, it's reported in October, fixed in November, then broken again in December) One reason that GNU libc is too big, is that it's full of extra sanity checks and tons of binary backward comparability. I personally would rather run a fedora-minimal (35MB) and get full GNU/Linux system unless you plane to run it on the edge or a CASIO calulator, ~29MB is not a big deal.
now let's get into statically linked binaries. Long, long, ago, we used to treat statically linked binaries as security threat, why? Nowadays there are tooling that reduce this risk by scanning (ex. quay.io) ..etc. but the point is still valid. Last but not least, calling CLI tools (as opposed to a library) is a good old UNIX philosophy not a bad thing (in its own), docker-compose itself is a cli binnary not a library. All of the above is my personal reasoning for my own choices feel free to disagree with the above, after all I do understand that my personal favorite color or football team is not a universal fact.
@Aposhian when I started this project docker-compose was in python, and rootless podman did not have cross-containers networking was impossible (I did many workarounds to make it work, like sharing network namespace and faking host using --add-host to 127.0.0.1, check branch 0.1) my focus now is to be feature complete. later I might consider go. |
@muayyad-alsadi Well Alpine we use is because of Colima and Lima for Mac. It is mostly for development. Don't really have a preference. Are you also aware that python had 6 CVE in 2021? One in 2022. It adds extra 100 MB size. And it is pain to maintain its dependencies. Especially for non python users. pip3 then sometimes pip, virtualenv, pyenv or perhaps venv, workon ... Horrible if you don't want to clash deps with another python project. And updating a pip installed project is harder than just doing Yes I program in python daily and would still prefer such tool in Go. Sry :D But yeah let's agree to disagree. |
Thanks for that suggestion. I'll play around with that and see how well it fits my use-case. |
I can query them and patch globally them using a single command
this project has only two python deps (yaml and dotenv)
don't get me wrong, I'm not against go, I might move to it in the future. |
@Aposhian check my comment here |
I found out that there is another project that is written in Go and with also better (closer to podman) license.
https://github.com/aramean/go-podman-compose
The text was updated successfully, but these errors were encountered: