-
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
Compose v2: Podman is unable to execute pods while running services via docker-compose #11717
Comments
Podman does not support the link feature. Docker deprecated this feature years ago, https://docs.docker.com/network/links/. |
@Luap99 I understand that, but as a docker-compose user I'm not specifically trying to link a container network, instead I'm simply trying to execute a container. It might do all sorts of stuff behind the scenes, even deprecated stuff like that one -- but I don't know that as I haven't checked My point is more of a If we diagnose that this is not a |
We are not going to support Linux, so perhaps every docker-compose ever written will not work with Podman. Can you script be fixed to not rely on link? |
I think this is the first time someone brings this up, I never heard of |
Might be worth a brief investigation of links, to see if we can "fake" them by sharing namespaces - I wouldn't want to expose this by the command line, but having something for Docker APIv2 might be worthwhile. |
@Luap99 Sure, I can use
Tbh, that's news to me. I thought |
From a brief investigation of linking, there is a large amount of environment-variable stuff that seems extraneous, but the core of it appears to be adding an entry to |
Yeah I also looked at this but the container create config from docker-compose looks weird. It sends |
Alright, that's honestly bizarre... |
@kriansa might want to try running it with I couldn't get I don't have docker installed in my environment (WSL2 with Ubuntu 20.04) and I think docker-compose is supposed to throw an error for the missing executable, but I never saw anything. This could really get wonky if you have docker and podman installed. If you run |
Well, I've got some good and bad news. It seems that the recently released This can be quickly worked around by a simple bash alias, and that's how I got alias docker-compose="/usr/lib/docker/cli-plugins/docker-compose compose" Update: Update v2.0.1 fixed it and we can use Moreover, now I've got an issue with
tl;dr: |
Nice work, we could easily add support for the alias into podman-docker package. |
Newer |
Another issue I've found: If there's VOLUME declarations in an image, manually mounting over those to actually preserve the data in a named volume will throw an To reproduce (I did this in a fresh Arch VM to ensure no outside influence):
This does not happen if you try to |
A friendly reminder that this issue had no activity for 30 days. |
I think this has been resolved in the meantime. Also note that images will resolve to docker.io (compat API) starting with Podman 4.0 (to be released early next year) |
It seems I am running into the same issue reported by @FallenWarrior2k when using rootless podman with
version: "3.9"
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
wordpress:
depends_on:
- db
image: wordpress:latest
volumes:
- wordpress_data:/var/www/html
ports:
- "8000:80"
restart: always
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
volumes:
db_data: {}
wordpress_data: {} This results in the following error:
However, I don't think it has much to do with an existing volume declaration in this case. I tried with version: "3.9"
services:
busybox:
image: busybox:latest
volumes:
- data:/data
entrypoint:
- sh
command:
- "-c"
- "sleep 1000"
volumes:
data: {}
I also tried it out with |
Having the exact same problem as @dszakallas reports. I'm running Podman v4.3.1. |
Can verify that upgrading from docker-compose |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
We can't run
docker-compose run
on aservice
which is currently running (via docker-compose start/up). It fails with the following error message:Steps to reproduce the issue:
docker-compose.yml
file with the following content:Run
docker-compose up -d
Run
docker-compose run --rm test sh
Describe the results you received:
Describe the results you expected:
I expect to have a running shell on the container
Additional information you deem important (e.g. issue happens only occasionally):
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/master/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Physical/my own computer
The text was updated successfully, but these errors were encountered: