Skip to content

Commit 3c5c1fc

Browse files
committed
docs: Fix startup comand
The main change is to specify the root password setting in an environment variable. We are adding other options that would be better to have. * --rm: Remove the container when finished * --name: Name the container * Change option name to full name
1 parent 8f37667 commit 3c5c1fc

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

README.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,41 @@
44

55
## Quick start
66

7-
You can start Mroonga as
7+
You can start Mroonga with an empty root password as
8+
89
```
9-
$ sudo docker container run -d groonga/mroonga
10+
$ sudo docker container run \
11+
--detach \
12+
--env MYSQL_ALLOW_EMPTY_PASSWORD=1 \
13+
--name mroonga \
14+
--rm \
15+
groonga/mroonga
1016
$ mysql -h <container's ipaddr> -u root
1117
```
1218

13-
MySQL root account doesn't set any password and isn't limited by connecting host.
14-
(This mean root was created by "GRANT ALL ON \*.\* TO root@'%' WITH GRANT OPTION")
19+
You need to specify one of the following as an environment variable:
1520

21+
- MYSQL_ROOT_PASSWORD
22+
- MYSQL_ALLOW_EMPTY_PASSWORD
23+
- MYSQL_RANDOM_ROOT_PASSWORD
1624

1725
## Mount host directory as Mroonga's datadir
1826

1927
Now, we support to mount datadir from host machine like this.
2028

2129
```
22-
$ sudo docker container run -d -v /path/to/datadir:/var/lib/mysql groonga/mroonga
30+
$ sudo docker container run \
31+
--detach \
32+
--env MYSQL_ALLOW_EMPTY_PASSWORD=1 \
33+
--name mroonga \
34+
--rm \
35+
--volume /path/to/datadir:/var/lib/mysql \
36+
groonga/mroonga
2337
```
2438

2539
If your /path/to/datadir has ibdata1, container decides using datadir as is.
2640
If your /path/to/datadir doesn't have ibdata1, container decides to re-initialize datadir for installing Mroonga.
2741

28-
2942
## Supported versions
3043

3144
Currently, groonga/mroonga provides these couples of versions.

0 commit comments

Comments
 (0)