Skip to content

Improve documentation example #1860

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

Closed
wants to merge 1 commit into from

Conversation

an3l
Copy link

@an3l an3l commented Jan 12, 2021

  • Documentation said that mysql client used in second container could
    use some-network. Problema with this (for the new users at least) is
    how to create the new network and that some-network excludes bridge
    network. Here is an example:
$ docker network create mariadb-net
$ docker network ls
NETWORK ID     NAME          DRIVER    SCOPE
6619c329efd7   bridge        bridge    local
c40fe8f5347a   host          host      local
ddff491eb0b3   mariadb-net   bridge    local
03bba7bb6438   none          null      local

$ docker run --network bridge --name mariadb-c1 -e MYSQL_ROOT_PASSWORD=root -d mariadb:10.5
9c64c725816e9950e92dfd2a0a65eb37e8c801e452ae2e5c3eb78c6907ef4d9d
$ docker run -it --network bridge --rm mariadb:10.5 mysql -hmariadb-c1 -uroot -proot
ERROR 2005 (HY000): Unknown MySQL server host 'mariadb-c1' (-2)

$ docker stop mariadb-c1 && docker rm mariadb-c1

$ docker run --network mariadb-net --name mariadb-c1 -e MYSQL_ROOT_PASSWORD=root -d mariadb:10.5

$ docker run -it --net mariadb-net --rm mariadb:10.5 mysql -hmariadb-c1 -uroot -proot
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.5.8-MariaDB-1:10.5.8+maria~focal mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>
  • Also in documentation when second/client container is created reference to
    some-network is not explained and this patch solves that.

    - Documentation said that mysql client used in second container could
    use `some-network`. Problema with this (for the new users at least) is
    how to create the new network and that `some-network` excludes `bridge`
    network. Here is an example:
    ```
    $ docker network create mariadb-net
    $ docker network ls
    NETWORK ID     NAME          DRIVER    SCOPE
    6619c329efd7   bridge        bridge    local
    c40fe8f5347a   host          host      local
    ddff491eb0b3   mariadb-net   bridge    local
    03bba7bb6438   none          null      local

    $ docker run --network bridge --name mariadb-c1 -e MYSQL_ROOT_PASSWORD=root -d mariadb:10.5
    9c64c725816e9950e92dfd2a0a65eb37e8c801e452ae2e5c3eb78c6907ef4d9d
    $ docker run -it --network bridge --rm mariadb:10.5 mysql -hmariadb-c1 -uroot -proot
    ERROR 2005 (HY000): Unknown MySQL server host 'mariadb-c1' (-2)

    $ docker stop mariadb-c1 && docker rm mariadb-c1

    $ docker run --network mariadb-net --name mariadb-c1 -e MYSQL_ROOT_PASSWORD=root -d mariadb:10.5

    $ docker run -it --net mariadb-net --rm mariadb:10.5 mysql -hmariadb-c1 -uroot -proot
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 3
    Server version: 10.5.8-MariaDB-1:10.5.8+maria~focal mariadb.org binary distribution

    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

    MariaDB [(none)]>
    ```
    - Also in documentation when second/client container is created reference to
      `some-network` is not explained and this patch solves that.
@an3l
Copy link
Author

an3l commented Jan 12, 2021

Don't understand the problem with markdownfmt...

@tianon
Copy link
Member

tianon commented Feb 1, 2021

Thanks for the contribution!

I'm OK with adding --network some-network (in line with #1441), but if we do much more than that, I'm afraid we're sliding down the slope of duplicating the Docker basics documentation, which I think we need to assume basic familiarity with (the length of our documentation has a practical limit and we need to be careful that what we include is as straightforward as possible).

@an3l
Copy link
Author

an3l commented Feb 4, 2021

Hi,
thanks for the review.
So basically you think that much more is (+2 lines + in-line comment):
there shouldn't be a showcase how to create the network (2 lines) and adding the comment what network is (in-line comment), which is addressing the issue that people have when starting?
From my perspective docker documentation should explain everything regarding the functionality and addressing the problems which exist explicitly in the document that the user is currently using (in this case mariadb).
There are problems and should be explained (not to google about why doesn't work).
So I don't think there should be any trade-off (even if it is duplicating )regarding the functionality of the documentation.

grooverdan added a commit to grooverdan/docs that referenced this pull request Feb 9, 2021
grooverdan added a commit to grooverdan/docs that referenced this pull request Feb 24, 2021
grooverdan added a commit to grooverdan/docs that referenced this pull request Feb 24, 2021
tianon pushed a commit that referenced this pull request Feb 25, 2021
* mariadb: update "What is MariaDB?"

Update description/license plege based on https://mariadb.org/about/

Update predominate users based on more recentl wikipedia links.

Drop-in compatibility is considered by many as overstepping the mark,
despite being moderately true, so limit the statement somewhat.

* mariadb: change hosting repository

* mariadb: replace logo

From https://mariadb.org/wp-content/uploads/2019/01/mariadb_org_rgb_v.png

* mariadb: reference JIRA for issues

* mariadb: content reference mariadb command line and docs

* mariadb: reference as MariaDB logs/configuration file

* mariadb: change README-short.txt

* mariadb: update maintainer

* mariadb: add get-help.md

* mariadb: *.sql.xz files initialization allowed

* mariadb: network naming from #1860
grooverdan added a commit to grooverdan/docs that referenced this pull request Mar 1, 2021
grooverdan added a commit to grooverdan/docs that referenced this pull request Mar 1, 2021
grooverdan added a commit to grooverdan/docs that referenced this pull request Mar 1, 2021
grooverdan added a commit to grooverdan/docs that referenced this pull request Mar 1, 2021
@yosifkit
Copy link
Member

Closing since this is included in #1889

@yosifkit yosifkit closed this Mar 22, 2021
grooverdan added a commit to grooverdan/docs that referenced this pull request May 2, 2021
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 this pull request may close these issues.

3 participants