Wordpress导致Docker崩溃

时间:2016-08-22 15:43:06

标签: php wordpress docker

我有Docker for Mac版本1.12.0-a(版本:11213)。我最近下载了Wordpress,将其解压缩,然后使用以下Dockerfile进行了docker-compose:

# Dockerfile
FROM php:7.0-cli
RUN docker-php-ext-install mysqli
COPY . /code
WORKDIR /code

和docker-compose.yml:

    version: '2'
    services:
      db:
        image: mysql:5.7
        volumes:
          - "./.data/db:/var/lib/mysql"
        restart: always
        environment:
          MYSQL_ROOT_PASSWORD: wordpress
          MYSQL_DATABASE: wordpress
          MYSQL_USER: wordpress
          MYSQL_PASSWORD: wordpress
      web:
        build: .
        command: php -S 0.0.0.0:8000
        depends_on:
          - db
        links:
          - db
        ports:
          - "8000:8000"
        restart: always
        environment:
          WORDPRESS_DB_HOST: db:3306
          WORDPRESS_DB_PASSWORD: wordpress

我打开网站并执行安装。然后我转到主题页面并重新加载一两次, Docker重新启动!

这是来自docker-compose的控制台日志的最后一位。

web_1  | [Mon Aug 22 15:38:09 2016] 172.20.0.1:37568 [200]: /wp-content/themes/twentysixteen/screenshot.png
web_1  | [Mon Aug 22 15:38:09 2016] 172.20.0.1:37584 [200]: /wp-content/themes/twentyfourteen/screenshot.png
web_1  | [Mon Aug 22 15:38:09 2016] 172.20.0.1:37580 [200]: /wp-content/themes/twentyfifteen/screenshot.png
web_1  | [Mon Aug 22 15:38:09 2016] 172.20.0.1:37582 [200]: /wp-includes/js/wp-emoji-release.min.js?ver=4.6
Exception in thread Thread-4:
Traceback (most recent call last):
  File "threading.py", line 810, in __bootstrap_inner
  File "threading.py", line 763, in run
  File "compose/cli/log_printer.py", line 149, in tail_container_logs
  File "compose/cli/log_printer.py", line 179, in wait_on_exit
  File "compose/container.py", line 239, in wait
  File "site-packages/docker/utils/decorators.py", line 21, in wrapped
  File "site-packages/docker/api/container.py", line 441, in wait
  File "site-packages/docker/client.py", line 174, in _raise_for_status
APIError: 500 Server Error: Internal Server Error ("dial unix /Users/jaywhy13/Library/Containers/com.docker.docker/Data/*00000003.00000948: connect: connection refused")
Exception in thread Thread-3:
Traceback (most recent call last):
  File "threading.py", line 810, in __bootstrap_inner
  File "threading.py", line 763, in run
  File "compose/cli/log_printer.py", line 149, in tail_container_logs
  File "compose/cli/log_printer.py", line 179, in wait_on_exit
  File "compose/container.py", line 239, in wait
  File "site-packages/docker/utils/decorators.py", line 21, in wrapped
  File "site-packages/docker/api/container.py", line 441, in wait
  File "site-packages/docker/client.py", line 174, in _raise_for_status
APIError: 500 Server Error: Internal Server Error ("dial unix /Users/jaywhy13/Library/Containers/com.docker.docker/Data/*00000003.00000948: connect: connection refused")

我通过干净的安装不止一次尝试过这种情况,同样的事情发生了。有没有人见过这个?

1 个答案:

答案 0 :(得分:0)

这似乎是码头工具的错误:https://github.com/docker/docker/issues/24045