0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

dockerでmysql8を使う

Last updated at Posted at 2022-07-05

前に書いた「dockerでmysqlを使う」から随分時間が経ち新しいmysqlを使いたかったので「dcoker-compose」で作成した。

docker-compose.yml
version: "3"
services:
  db:
    platform: linux/x86_64
    image: mysql:8.0.19
    ports:
      - 13306:3306
    volumes:
      - db-store:/var/lib/mysql
      - ./logs:/var/log/mysql
      - ./dockerfiles/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
    container_name: my-db
    environment:
      - MYSQL_DATABASE=hoge
      - MYSQL_USER=hoge
      - MYSQL_PASSWORD=pass
      - MYSQL_ROOT_PASSWORD=pass
      - TZ="Asia/Tokyo"
volumes:
  db-store:

READMEにも書いてありますが、 git clone して docker-compose up -d --build で起動します。

docker-composeのバージョンも随分上がってて書き方わからなかった。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?