2018-03-30 07:24:39 +00:00
|
|
|
# alpine-mysql
|
|
|
|
a docker image base on alpine with mysql
|
|
|
|
|
|
|
|
# build image
|
|
|
|
```
|
|
|
|
docker build -t ehlxr/alpine-mysql .
|
2018-03-30 10:41:51 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
# build image (docker-compose)
|
|
|
|
|
|
|
|
```
|
|
|
|
docker-compose build
|
2018-03-30 07:24:39 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
# Usage
|
|
|
|
```
|
2018-03-30 10:41:51 +00:00
|
|
|
docker run -it --name mysql -p 3306:3306 -v $(pwd)/db-data:/data -e MYSQL_DATABASE=admin -e MYSQL_USER=ehlxr -e MYSQL_PASSWORD=prY6KaQC -e MYSQL_ROOT_PASSWORD=eDWyvjS2 ehlxr/alpine-mysql
|
|
|
|
```
|
|
|
|
|
2018-03-30 10:47:01 +00:00
|
|
|
> It will create a new db(default is `admin`) whith user `ehlxr` set password is `prY6KaQC`, and set mysql root password(default is `eDWyvjS2`)
|
2018-03-30 10:41:51 +00:00
|
|
|
|
|
|
|
# Usage (docker-compose)
|
|
|
|
```
|
|
|
|
docker-compose up -d
|
2018-03-30 07:24:39 +00:00
|
|
|
```
|
|
|
|
|
2018-03-30 10:41:51 +00:00
|
|
|
> It will create a new db(default is `admin`) whith user `ehlxr` set password is `prY6KaQC`, and set mysql root password(default is `eDWyvjS2`)
|