version: "3" services: db: image: mysql:5.7 ports: - "3306:3306" environment: MYSQL_DATABASE: playground MYSQL_ROOT_PASSWORD: password command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci これ↑をちらっと書いてカレントディレクトリに置き、 docker-compose up -d でMySQLサーバが立ち上がります。 設定は見ての通りですが (ローカルから見える)ポートは 3306 rootのパスワードは password デフォルトで作られるDB名は playground デフォルトで作られたDBのcharsetは utf8mb4 <= ここが書きたくて