docker / compose

Define and run multi-container applications with Docker
https://docs.docker.com/compose/
Apache License 2.0
33.81k stars 5.21k forks source link

Flag to set custom docker executable #8304

Closed imgx64 closed 2 years ago

imgx64 commented 3 years ago

Is your feature request related to a problem? Please describe. I'm trying to use docker-compose with podman. Most things work fine, but if docker-compose attempts to build an image, it fails because it has hardcoded docker build command (see here), and is unable to run podman build instead.

I modified the source code to change it to podman, and it worked fine.

Describe the solution you'd like I'd like docker-compose to add a flag to manually select a path to a different docker executable. For example: docker-compose --docker-bin /usr/bin/podman up

Describe alternatives you've considered Building the images manually before running docker-compose up is a workaround for this.

Additional context

ndeloof commented 3 years ago

docker-compose is not a script delegating docker commands to another tool, it's a plain standalone tool which uses the Docker Engine API, just like docker command does.

imgx64 commented 3 years ago

In my original post, I linked to the part where docker-compose calls the docker binary to build the image.

https://github.com/docker/compose/blob/0bea52b18dda3de8c28fcfb0c80cc08b8950645e/compose/service.py#L1958

gotmax23 commented 3 years ago

@ndeloof Can you please reopen the issue? As @imgx64 said, the docker-compose build function notably does not use the Docker api and instead calls the Docker binary directly.

ndeloof commented 3 years ago

Re-opened as requested, but with Compose v2 being released soon, docker-compose will most probably not get such new features approved.

gotmax23 commented 3 years ago

Thanks!

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically closed because it had not recent activity during the stale period.