LoginSignup
0
0

dockerでmysqlを動かす時の設定ファイル(メモ)

Posted at
docker-compose.yml
version: "3.9"

services:
  mysql:
  #  platform: linux/x86_64
    image: mysql:8.0.28
    platform: linux/amd64
    container_name: mysql-container
    ports:
      - "3306:3306"
    environment:
      MYSQL_ROOT_PASSWORD: 
      TZ: "Asia/Tokyo"
    volumes:
      - data-volume:/var/lib/mysql
      - ~/path_to_file:/path_to_file

volumes:
 data-volume:

path_to_fileはマウントさせたいファイルです
data-volumeでデータの永続化をしています

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