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.
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 rundocker-compose > output.txt
I receive the help contents in thecmd
screen, and nothing inoutput.txt
. – Steve – 2017-01-29T08:34:57.613You 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.350On 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