Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Prompt users to use docker compose from docker-compose #1149

Closed
gtardif opened this issue Jan 15, 2021 · 10 comments · Fixed by docker/compose#8166
Closed

Prompt users to use docker compose from docker-compose #1149

gtardif opened this issue Jan 15, 2021 · 10 comments · Fixed by docker/compose#8166
Assignees
Labels
documentation 📓 Related to improving documentation and the wiki.

Comments

@gtardif
Copy link
Contributor

gtardif commented Jan 15, 2021

In docker-compose general help and for the up command, prompt users to use docker compose. Only do this for Windows and macOS.

up message: "Docker Compose is now in the Docker CLI, try docker compose up"

Add at the top of the up output with a new line after it so that it's more visible.

docker-compose up
Docker Compose is now in the Docker CLI, try `docker compose up`

Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/
Creating network "tmp_default" with the default driver
Pulling front (nginx:)...
latest: Pulling from library/nginx

help message: "Docker Compose is now in the Docker CLI, try docker compose"

Add at the bottom of the help message.

...
  unpause            Unpause services
  up                 Create and start containers
  version            Show version information and quit

Docker Compose is now in the Docker CLI, try `docker compose`
@gtardif gtardif added documentation 📓 Related to improving documentation and the wiki. compose labels Jan 15, 2021
@gtardif
Copy link
Contributor Author

gtardif commented Jan 18, 2021

Add this only for mac/windows users for now, as compose-cli might not be available for linux users

@gtardif
Copy link
Contributor Author

gtardif commented Feb 12, 2021

Do this only in docker-compose help ? @mkvitnitsky

@driesvints
Copy link

Does anyone know in which exact version did docker compose land? That way we can advertise a minimum version of Docker for our users of Laravel Sail.

@henrik242
Copy link

Also, is this suspected to be the default behaviour in Linux any time soon?

@natewiebe13
Copy link

natewiebe13 commented May 17, 2021

Also, is this suspected to be the default behaviour in Linux any time soon?

Would also like to know this as we're starting to write tooling around this.

Edit: Was able to answer this for myself by reading https://docs.docker.com/compose/cli-command/, though it does seem strange to recommend using something that's in preview without mentioning that it's a preview/shouldn't be used in production. Without reading the link, one might assume it's good to start replacing instances of docker-compose.

@driesvints
Copy link

@natewiebe13 that's indeed super confusing. I was also under the impression that this was stable based on the message from that's given from docker-compose.

@Chealer
Copy link

Chealer commented May 18, 2021

Edit: Was able to answer this for myself by reading https://docs.docker.com/compose/cli-command/, though it does seem strange to recommend using something that's in preview without mentioning that it's a preview/shouldn't be used in production. Without reading the link, one might assume it's good to start replacing instances of docker-compose.

I'm afraid @natewiebe13 is quite right. I upgraded to Docker Desktop for Windows 3.3.3 and started seeing that message. I then switched to docker compose up, and later realized my application was unusable due to broken networking. I thought the upgrade was the cause, so it took me 10 minutes to figure out I simply needed to go back to docker-compose.

@thaJeztah
Copy link
Member

@Chealer if you have steps to reproduce your problem, could you open a ticket with steps to reproduce the networking problem you ran into?

@Chealer
Copy link

Chealer commented May 18, 2021

@thaJeztah reproducing my case would be as easy as switching a dash to a space for me. The problem is one container can't ping the other by hostname, surely because DNS doesn't resolve. The hostname is defined as an alias (serveurpg):

  current:
    build:
      context: ./docker/
      dockerfile: current
      args:
        - supervisord_PASSWORD
    networks:
      default:
        aliases:
          - serveurelastic
          - serveurpg
    ports:
      - "5432:5432"
    container_name: current
    hostname: current
    environment:
      # Pour Elasticsearch
      - discovery.type=single-node

That being said, thanks for asking, and to actually answer your question: I could, but I don't know Docker networking nearly enough to positively affirm that docker compose up's behavior is incorrect. We came up with a docker-compose.yml which works after quite some work, but I have no idea if the specification mandates that it works, or if we are relying on undocumented behavior.

However, if I was to see an authoritative source clearly (explicitly) indicate that docker compose up and docker-compose up are currently supposed to be functionally equivalent, then I would report my case.

@JackOfSpade
Copy link

Yeah... I'm not touching this until next year or we get a stable version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation 📓 Related to improving documentation and the wiki.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants