Skip to content
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

Docker compose v2 compat? #138

Closed
butsjoh opened this issue Jul 19, 2021 · 8 comments · Fixed by #140
Closed

Docker compose v2 compat? #138

butsjoh opened this issue Jul 19, 2021 · 8 comments · Fixed by #140

Comments

@butsjoh
Copy link

butsjoh commented Jul 19, 2021

After a docker update (i am on osx) it turned on Docker compose V2 by default (see https://docs.docker.com/compose/cli-command/). After turning it off stuff started working again. Any idea if this is in the pipeline of being supported?

@bibendi
Copy link
Owner

bibendi commented Jul 19, 2021

What error did you get?

@Adre
Copy link

Adre commented Jul 19, 2021

I seem to be having the same issue:

Actual behaviour

dip provision hangs. it gets as far as creating networks and volumes and just sits there until I ctrl+c

Expected behaviour

The command successfully builds the images ready to be run by other dip commands

Environment

  • OS X 11.2.3
  • Docker Desktop 3.5.2
  • dip 6.1.0

Notes

Worked fine until I updated Docker Desktop - I don't know what the previous version was, but I tend to update when it tells me there's a new version - so pretty up-to-date

Disabling the Use Docker Compose V2 checkbox under Experimental Features in Docker Desktop resolved the issue for me.

@butsjoh
Copy link
Author

butsjoh commented Jul 19, 2021

I got the following error "Can't separate key from value". It indeed seems related to docker compose v2 (apache/airflow#16949)

@bibendi
Copy link
Owner

bibendi commented Jul 19, 2021

Do you have the env file?

@butsjoh
Copy link
Author

butsjoh commented Jul 19, 2021

Yes we have but all of our defined env variables have a value defined. Not sure if this is a dip problem perse and it is more docker related. I am using the most recent dip version (7.1.4). Will check later today if it is indeed related to my setup.

@unikitty37
Copy link

This also breaks readline in the Rails console; with Use Docker Compose V2 enabled, dip rails c gives a console where cursor keys just insert their escape sequences rather than moving the cursor, and Emacs keys like ⌃A do likewise. Disabling the setting in Docker Desktop restores the expected behaviour.

@RigDillinger
Copy link

RigDillinger commented Sep 30, 2021

According to the link given above (https://docs.docker.com/compose/cli-command/) docker-compose is turning into docker subcommand -> docker compose
Hence the error:

Traceback (most recent call last):
        ...
         3: from /home/user/.rvm/gems/ruby-2.7.3/gems/dip-7.1.4/lib/dip/command.rb:30:in `exec_program'
         2: from /home/user/.rvm/gems/ruby-2.7.3/gems/dip-7.1.4/lib/dip/command.rb:48:in `run'
         1: from /home/user/.rvm/gems/ruby-2.7.3/gems/dip-7.1.4/lib/dip/command.rb:16:in `call'
/home/user/.rvm/gems/ruby-2.7.3/gems/dip-7.1.4/lib/dip/command.rb:16:in `exec': No such file or directory - docker-compose (Errno::ENOENT)

I changed docker-compose to docker compose in compose.rb:26 and the commands i ran through dip were successful.
So I believe to solve the issue and to maintain compatibility, the compose version should be defined as an option in dip.yml if it is possible.
Any thoughts?
@bibendi

@bibendi
Copy link
Owner

bibendi commented Sep 30, 2021

Very good! I'll prepare DIP to the latest Compose command next week.

@bibendi bibendi mentioned this issue Oct 22, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants