docker-library/docs

docs/mysql: ambiguous --network option in "connect to mysql" section.

Opened this issue · 1 comments

I want to

  • create MySql container
  • connect to this container from docker

I follow instructions

  • to create container
    docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:tag
    
  • to connect
    docker run -it --network some-network --rm mysql mysql -hsome-mysql -uexample-user -p
    

The last instruction assumes MySql instance were created with some network. But it wasn't.

Why is there --network some-network option in last instruction but not something like --link some-mysql?

https://github.com/docker-library/faq#--link-is-deprecated

Several of the official images were updated in #1441 with the compromise of using --network some-network in an attempt to convey to users that additional effort will be required for them to connect their services successfully (implying that they should go read documentation / learn about Docker's container networking functionality).