Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wangxian/alpine-mysql
a docker image base on alpine with MySQL/MariaDB
https://github.com/wangxian/alpine-mysql
Last synced: about 2 months ago
JSON representation
a docker image base on alpine with MySQL/MariaDB
- Host: GitHub
- URL: https://github.com/wangxian/alpine-mysql
- Owner: wangxian
- License: mit
- Created: 2015-11-07T15:36:21.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-05-02T17:07:22.000Z (7 months ago)
- Last Synced: 2024-08-01T03:13:43.278Z (4 months ago)
- Language: Shell
- Homepage:
- Size: 22.5 KB
- Stars: 124
- Watchers: 7
- Forks: 91
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- stars - wangxian/alpine-mysql
README
# alpine-mysql
a very small docker image base on alpine with MySQL/MariaDB## build local image (docker)
```
docker build -t wangxian/alpine-mysql:latest .
```## build image (docker-compose)
```
cp .env-dist .env
vim build .env # change environment if you need
docker compose build
```## Usage (docker)
```
# only root user
docker run -it --name mysql -p 3306:3306 -v ~/appdata/mysql:/app/mysql -e MYSQL_DATABASE=admin -e MYSQL_ROOT_PASSWORD=s6321..8 wangxian/alpine-mysql# use normal user of app
docker run -it --name mysql -p 3306:3306 -v ~/appdata/mysql:/app/mysql -e MYSQL_DATABASE=admin -e MYSQL_USER=app -e MYSQL_PASSWORD=app123..8 -e MYSQL_ROOT_PASSWORD=s6321..8 wangxian/alpine-mysql
```## Usage (docker-compose)
```
docker-compose up -d
```It will:
- set no password for 'root' with localhost connections;
- set password for 'root' with non-localhost connection
- create a new db
- create an normal user and set his password for non-localhost connections