Can't create Wordpress docker on Windows

2

From this page, I have created c:\users\steve\Documents\Docker\Wordpress\docker-compose.yml, containing:

version: '2'

services:
   db:
     image: mysql:5.7
     volumes:
       - db_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: wordpress
       MYSQL_DATABASE: wordpress
       MYSQL_USER: wordpress
       MYSQL_PASSWORD: wordpress

   wordpress:
     depends_on:
       - db
     image: wordpress:latest
     ports:
       - "8000:80"
     restart: always
     environment:
       WORDPRESS_DB_HOST: db:3306
       WORDPRESS_DB_PASSWORD: wordpress
volumes:
    db_data:

When I open a cmd shell or powershell, navigate to C:\users\steve\Documents\Docker\Wordpress, and run

docker-compose up -d

I receive:

Traceback (most recent call
  File "<string>", line 3, i
  File "compose\cli\main.py"
  File "compose\cli\main.py"
  File "compose\cli\main.py"
  File "compose\project.py",
  File "compose\project.py",
  File "site-packages\docker
  File "site-packages\docker
  File "site-packages\docker
  File "site-packages\reques
  File "site-packages\reques
  File "site-packages\reques
  File "site-packages\reques
  File "site-packages\reques
  File "site-packages\reques
  File "httplib.py", line 10
  File "httplib.py", line 10
  File "httplib.py", line 10
  File "httplib.py", line 88
  File "httplib.py", line 84
  File "site-packages\docker
  File "site-packages\docker
  File "site-packages\docker
pywintypes.error: (2, 'WaitN
docker-compose returned -1

When I run docker-compose up -d > output.txt, output.txt is empty. If I run docker-compose > output.txt I receive the help contents in the cmd screen, and nothing in output.txt.

What am I doing wrong? Thanks.

Steve

Posted 2017-01-22T12:18:26.240

Reputation: 2 473

Could you please pipe the output of docker-compose to a log file? Seems like most of the output has been cropped by your commandshell.

I just used your composefile on an ubuntu machine and can confirm that wordpress is indeed firing up, so I guess we'll have to check what's wrong with your environment. – Patrick R. – 2017-01-26T14:38:42.550

Thanks @PatrickR. When I run docker-compose up -d > output.txt, output.txt is empty. If I run docker-compose > output.txt I receive the help contents in the cmd screen, and nothing in output.txt. – Steve – 2017-01-29T08:34:57.613

You might want to drop the -d flag while you're debugging this: docker-compose up > output.txt. This should show you any stdout from the container. – Patrick R. – 2017-01-30T09:26:59.350

On another note, which version of Docker for Windows are you using? Did you try completely reinstallting with a current version? Is Hyper-V enabled? Any other hypervisors on your machine? – Patrick R. – 2017-01-30T09:29:53.963

Answers

0

It seems like it can't find a file. Please check your PATH and make sure it points to your Python installation.

This guy had a similar problem:

Well, it looks like I had this setup in my path:

C:\Users\MYUSERNAME\AppData\Local\Programs\Python\Python35-32\Scripts C:\Users\MYUSERNAME\AppData\Local\Programs\Python\Python35-32\

I don't know how that was set or what installed that, perhaps docker toolbox? Not sure, but once I changed the path to be pointed to python2.7 in my windows environment, then everything started working correctly and it pulled all the images that I needed for this.

Thanks for your prompt response.

Source

r3r57

Posted 2017-01-22T12:18:26.240

Reputation: 66