Docker 启动 MySQL

  1. [[email protected].io]# docker run --rm --name mysql -p 3306:3306 \
  2. -v /home/liqiang.io/data/mysql:/var/lib/mysql \
  3. -e MYSQL_ROOT_PASSWORD=password -d \
  4. mariadb:5.5

Docker 启动 Postgres

  1. [[email protected].io]# docker run --rm --name postgres \
  2. -v /home/liuliqiang/soft/data/postgres:/var/lib/postgresql/data \
  3. -e POSTGRES_PASSWORD=mysecretpassword
  4. -p 5432:5432 -d \
  5. postgres:12.1