Skip to content

Commit a7e8393

Browse files
committed
mariadb: network naming from docker-library#1860
1 parent 5999ef8 commit a7e8393

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

mariadb/content.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,16 @@ The intent is also to maintain high compatibility with MySQL, ensuring a library
1313
Starting a MariaDB instance is simple:
1414

1515
```console
16-
$ docker run --name some-%%REPO%% -e MARIADB_ROOT_PASSWORD=my-secret-pw -d %%IMAGE%%:tag
16+
$ docker run --port 127.0.0.1:3306:3306 --name some-%%REPO%% -e MARIADB_ROOT_PASSWORD=my-secret-pw -d %%IMAGE%%:tag
1717
```
1818

19-
... where `some-%%REPO%%` is the name you want to assign to your container, `my-secret-pw` is the password to be set for the MySQL root user and `tag` is the tag specifying the MySQL version you want. See the list above for relevant tags.
19+
or:
20+
21+
```console
22+
$ docker network create some-network # Create the network
23+
$ docker run --net some-network --name some-%%REPO%% -e MARIADB_ROOT_PASSWORD=my-secret-pw -d %%IMAGE%%:tag
24+
```
25+
... where `some-network` is newly created network (other than `bridge` as the default network), `some-%%REPO%%` is the name you want to assign to your container, `my-secret-pw` is the password to be set for the MariaDB root user and `tag` is the tag specifying the MariaDB version you want. See the list above for relevant tags.
2026

2127
## Connect to MariaDB from the MySQL/MariaDB command line client
2228

0 commit comments

Comments
 (0)