![退会済みユーザー](https://ddjkaamml8q8x.cloudfront.net/profileImages/deletedUser/icnUserSample.jpeg)
わからないこと
dockerでmysqlが起動できない。
環境
Django==2.0.4 uwsgi==2.0.17 PyMySQL==0.8.0
docker-compose.yml
version: '3' services: nginx: image: nginx:1.13 ports: - "8000:8000" volumes: - ./nginx/conf:/etc/nginx/conf.d - ./nginx/uwsgi_params:/etc/nginx/uwsgi_params - ./src/static:/static depends_on: - python db: image: mysql:5.7 command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci ports: - "3306:3306" environment: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: hoge MYSQL_USER: hoge MYSQL_PASSWORD: hoge TZ: 'Asia/Tokyo' volumes: - ./mysql:/var/lib/mysql - ./sql:/docker-entrypoint-initdb.d python: build: ./python command: uwsgi --socket :8001 --module app.wsgi --py-autoreload 1 --logto /tmp/mylog.log volumes: - ./src:/code - ./src/static:/static expose: - "8001" depends_on: - db
こちらで docker-compose build
→ docker-compose up
をすると以下のエラーになります。
エラー
Attaching to docker-django_db_1, docker-django_python_1, docker-django_nginx_1 db_1 | 2020-02-16 16:54:55+09:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.29-1debian9 started. db_1 | 2020-02-16 16:54:55+09:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql' db_1 | 2020-02-16 16:54:55+09:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.29-1debian9 started. db_1 | 2020-02-16T07:54:55.681543Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details). db_1 | 2020-02-16T07:54:55.687089Z 0 [Note] mysqld (mysqld 5.7.29) starting as process 1 ... db_1 | 2020-02-16T07:54:55.697332Z 0 [Note] InnoDB: PUNCH HOLE support available db_1 | 2020-02-16T07:54:55.697837Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins db_1 | 2020-02-16T07:54:55.698146Z 0 [Note] InnoDB: Uses event mutexes db_1 | 2020-02-16T07:54:55.698440Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier db_1 | 2020-02-16T07:54:55.698729Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 db_1 | 2020-02-16T07:54:55.698965Z 0 [Note] InnoDB: Using Linux native AIO db_1 | 2020-02-16T07:54:55.699889Z 0 [Note] InnoDB: Number of pools: 1 db_1 | 2020-02-16T07:54:55.700652Z 0 [Note] InnoDB: Using CPU crc32 instructions db_1 | 2020-02-16T07:54:55.702690Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M db_1 | 2020-02-16T07:54:55.710909Z 0 [Note] InnoDB: Completed initialization of buffer pool db_1 | 2020-02-16T07:54:55.713161Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority(). db_1 | 2020-02-16T07:54:55.739890Z 0 [ERROR] InnoDB: Cannot create log files because data files are corrupt or the database was not shut down cleanly after creating the data files. db_1 | 2020-02-16T07:54:55.740233Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error db_1 | 2020-02-16T07:54:56.348507Z 0 [ERROR] Plugin 'InnoDB' init function returned error. db_1 | 2020-02-16T07:54:56.349107Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. db_1 | 2020-02-16T07:54:56.349314Z 0 [ERROR] Failed to initialize builtin plugins. db_1 | 2020-02-16T07:54:56.349511Z 0 [ERROR] Aborting db_1 | db_1 | 2020-02-16T07:54:56.349840Z 0 [Note] Binlog end db_1 | 2020-02-16T07:54:56.350215Z 0 [Note] Shutting down plugin 'CSV' db_1 | 2020-02-16T07:54:56.354331Z 0 [Note] mysqld: Shutdown complete db_1 | docker-django_db_1 exited with code 1
# dbだけ立ち上がらない Name Command State Ports ------------------------------------------------------------------------------------------------- docker-django_db_1 docker-entrypoint.sh mysql ... Exit 1 docker-django_nginx_1 nginx -g daemon off; Up 80/tcp, 0.0.0.0:8000->8000/tcp docker-django_python_1 uwsgi --socket :8001 --mod ... Up 8001/tcp
試したこと
色々と検索して試したことは、一度コンテナの削除をして再度ビルドから試しましたが、うまく行かず
どなたかお分かりの方、ご教示お願い致します。
![guest](/img/icon/icnUserSample.jpg)
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2020/02/17 00:08
退会済みユーザー
2020/02/17 04:12