-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
introduce compose support in podman #11780
Comments
Please consider adding features from podman-compose. I'm interested in annotations, though I'm aware that it's supported by
Maybe add systemd service files? I've been using these with podman-compose. |
Given that |
A friendly reminder that this issue had no activity for 30 days. |
A friendly reminder that this issue had no activity for 30 days. |
A friendly reminder that this issue had no activity for 30 days. |
@rhatdan I think doing this will confuse our users r/n with all the options out there -- 'podman compose'; and we are also trying to push people to play kube. wdyt? |
I think that supporting the compose spec would make it conciderably easier for more users to make the switch from Docker to Podman. Compose is awesome👍 |
Well docker-compose works with Podman socket now. |
I think the ability to convert a compose file into a pod (with the features it supports such as systemd units) would be handy at least (even if the cli is not there). Probably a different issue? |
A friendly reminder that this issue had no activity for 30 days. |
I plan to start working on this in my fork. |
in docker you place binaries with exec flag in we need to place |
Only issue, is you would need to add support for CLI plugins to Podman then. |
@rhatdan I've created an issue for that |
Related: #13425 |
A friendly reminder that this issue had no activity for 30 days. |
/remove stale |
@ashley-cui Intern? |
@rhatdan, can you add him to Containers so we can assign him stuff? |
got it |
Podman can play Kubernetes files and there's a compose package/plugin to run Docker Compose. Could the interface for both be consolidated? For example:
#12475 already suggested improving the current |
@ashley-cui @rhatdan what is the task in this issue? I see a number of ideas floating around but think we need to iron out what exactly should be done. |
I think we go back to the original which looks for docker CLI Plugins and executes them as part of the podman command. |
Is there a central location where it's documented how to use Docker Compose v2 with podman? On one hand, issues like make it seem like it's not supported, but then issues like: and blog posts such as
make it sound that Docker Compose v2 is on some level supported. Is there any documentation on how someone can get started with this? Is it only on macOS? Can an Ubuntu machine be set up to work with it? I'd like to try to start tinkering with whatever level of support exists, but can't seem to find a central location where this is documented. |
Currently Podman does not work with CLI Plugins, This has nothing to do with docker compose. You can run a docker-compose client against Podman Service and it works. CLI Plugins are being worked on but slowly. |
Compose v2 should work with Podman in the same manner as Compose v1 (install podman-docker or set |
There are no support restrictions, it will work anywhere Podman runs |
I was able to make some progress on making end-to-end instructions for Docker Compose v2 with Podmanhttps://podman.io/getting-started/installation
Docker Compose v2https://docs.docker.com/compose/install/compose-plugin/#install-the-plugin-manually
Add DockerHub as default registryAdd the following line to
PullingAt this point, running without
But running with
BuildingBuilding does not quite work:
Questions
If I can get help making this all work, I'd be happy to try to contribute the results into a "Porting from Docker Engine" doc page / tutorial or similar. I think having this laid out as a tutorial top to bottom would really help new users to Podman like myself. Related |
For running without sudo, you need to export the For the second question, I'm afraid I can't answer, that's a packaging issue and I'm not really familiar with Ubuntu. For the third question, you need to set an environment variable ( |
A friendly reminder that this issue had no activity for 30 days. |
Bump because it's still relevant. |
As a stopgap, would it be reasonable to update the diff --git a/docker b/docker
index efc363f..1087d03 100755
--- a/docker
+++ b/docker
@@ -1,4 +1,10 @@
#!/bin/sh
[ -e /etc/containers/nodocker ] || \
echo "Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg." >&2
-exec /usr/bin/podman "$@"
+
+if [ "$1" = "compose" ]; then
+ shift
+ exec /usr/bin/podman-compose "$@"
+else
+ exec /usr/bin/podman "$@"
+fi I don't how much the Docker CLI has changed between legacy |
podman-compose and docker-compose are two different things, that both use the compose YAML files to create containers. podman-compose is a wrapper around the podman command and executes podman commands under the hood. While docker-compose talks to the podman service socket and talks the Docker API to it and the podman service creates containers. We have talked about using the compose plugin of docker to be executed by podman compose as a compatibility issue, but so far no one has taken this up. |
Bump, simple services:
base:
image: alpine:latest
command: sh -c "echo ok" See details here #16092 (comment) |
/kind feature
Description
Introduce compose as part of podman CLI functionality
Steps to reproduce the issue:
Describe the results you received:
similar to
docker compose
command I'd expect compose file to be interpretedDescribe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Package info (e.g. output of
rpm -q podman
orapt list podman
):podman installed via brew on MacOS
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
No
Additional environment details (AWS, VirtualBox, physical, etc.):
MacOS
The text was updated successfully, but these errors were encountered: