-
Notifications
You must be signed in to change notification settings - Fork 2.6k
generate systemd from "docker-composed" container #13289
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
Comments
As documented the |
Note to self RTFD... many thanks - confirmed indeed --new is the issue... Thanks for pointing us in the right direction. It is obvious on reflection but transitioning from docker / docker-compose this wasn't particularly clear - since the concept of a create command is very much abstracted... |
Theoretically this should be possible once the |
Can you elaborate on that? How would we find a reverse mapping from a container to the CLI options/flags it has been created with. |
If you look at what Charlie has done there - I think we're very close. It gets us to a Specgen, which is basically a parsed CLI. We'd need extra plumbing (a CLI way of creating a container directly from a Specgen - |
Im just running with docker-compose hooked into podmans rest service via DOCKER_HOST variable. Essentially as docker compose must ultimately define a command to bring the container up I'd assume that this could / should be transposed somehow - this does all sound interesting and I'm happy to help where I can if needed - it would be great to be able to sync the systemctl command to the compose structure when using that as a basis for your container spec. |
i'd be really interested in looking into a way to get all the way back to CLI options... could be helpful for many scenarios. |
That would indeed be great. I am still a worried how robust it would be though. Would for instance |
We'd potentially need to extend it to support this, but we have a mechanism for this (use annotations to store configuration settings like |
Or, alternatively, we just add these fields into Specgen itself - no real reason we can't have them there. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Created a container using docker-compose - which goes up fine, we can see runnin "podman ps" the runnign container, however when we try to export this so we can run this at startup it fails with -
Steps to reproduce the issue:
So far so good, the command line I added above, with or without the same result.
Describe the results you expected:
podman generate to generate the output it should.
Additional information you deem important (e.g. issue happens only occasionally):
Hppends every time. Have verified runc and crun are present also
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes - at least the latest upsrtream version available on debian 11 (backports enabled).
Additional environment details (AWS, VirtualBox, physical, etc.):
Running bare metal, from root user account - same containers run fine in docker, I'm migrating to podman but would like to use compose for the container definintions, auto-start doesnt seem to be supported which is fine, systemd feels like a good approach,, however I'm not having any joy getting running with this - apolgies if this is a noob problem but I'm struggling to find the root cause of this.
The text was updated successfully, but these errors were encountered: