Django run on Docker Toolbox with WSL
up vote
0
down vote
favorite
I try to run my django project on local machine (on which I'm using WSL) using docker without using nginx or apache but with postgres as db and simple
python manage.py runserver
It seems that Docker itself works fine, I am able to create and run containers, logs show that all is up and running, I can ssh to both container with app and database but I can't reach it via my browser.
Internet says that I need to set up propertly network on VM so I did:
I'm setting my envs like that
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST=tcp://192.168.99.100:2376
export DOCKER_CERT_PATH='/path/to/mounted/dir/.docker/machine/machines/default'
export DOCKER_MACHINE_NAME="default"
export COMPOSE_CONVERT_WINDOWS_PATHS="true"
Some tutorials says that instead of DOCKER_HOST=tcp://192.168.99.100:2376
it should be DOCKER_HOST=tcp://localhost:2376
(I know that documentation says port 2375
but for some reason toolbox choose 2376
when it was installing) but with second scenario WSL is unable to find docker deamon and any command's throwing an error:
> docker info
Cannot connect to the Docker daemon at tcp://localhost:2376. Is the docker daemon running?
For a moment I thought that this might be a problem but I found many other tutorials where first config was used.
I've tried also running
python manage.py runserver 0.0.0.0:8000
python manage.py runserver 127.0.0.1:8000
python manage.py runserver 192.168.99.100:8000
I think I don't quite understand which ip is what and there is a problem but I also can't find any good answer to that.
I'm struggling with it for 2 days now so literally any hint will be priceless.
Thanks.
django windows-subsystem-for-linux docker-toolbox
add a comment |
up vote
0
down vote
favorite
I try to run my django project on local machine (on which I'm using WSL) using docker without using nginx or apache but with postgres as db and simple
python manage.py runserver
It seems that Docker itself works fine, I am able to create and run containers, logs show that all is up and running, I can ssh to both container with app and database but I can't reach it via my browser.
Internet says that I need to set up propertly network on VM so I did:
I'm setting my envs like that
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST=tcp://192.168.99.100:2376
export DOCKER_CERT_PATH='/path/to/mounted/dir/.docker/machine/machines/default'
export DOCKER_MACHINE_NAME="default"
export COMPOSE_CONVERT_WINDOWS_PATHS="true"
Some tutorials says that instead of DOCKER_HOST=tcp://192.168.99.100:2376
it should be DOCKER_HOST=tcp://localhost:2376
(I know that documentation says port 2375
but for some reason toolbox choose 2376
when it was installing) but with second scenario WSL is unable to find docker deamon and any command's throwing an error:
> docker info
Cannot connect to the Docker daemon at tcp://localhost:2376. Is the docker daemon running?
For a moment I thought that this might be a problem but I found many other tutorials where first config was used.
I've tried also running
python manage.py runserver 0.0.0.0:8000
python manage.py runserver 127.0.0.1:8000
python manage.py runserver 192.168.99.100:8000
I think I don't quite understand which ip is what and there is a problem but I also can't find any good answer to that.
I'm struggling with it for 2 days now so literally any hint will be priceless.
Thanks.
django windows-subsystem-for-linux docker-toolbox
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I try to run my django project on local machine (on which I'm using WSL) using docker without using nginx or apache but with postgres as db and simple
python manage.py runserver
It seems that Docker itself works fine, I am able to create and run containers, logs show that all is up and running, I can ssh to both container with app and database but I can't reach it via my browser.
Internet says that I need to set up propertly network on VM so I did:
I'm setting my envs like that
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST=tcp://192.168.99.100:2376
export DOCKER_CERT_PATH='/path/to/mounted/dir/.docker/machine/machines/default'
export DOCKER_MACHINE_NAME="default"
export COMPOSE_CONVERT_WINDOWS_PATHS="true"
Some tutorials says that instead of DOCKER_HOST=tcp://192.168.99.100:2376
it should be DOCKER_HOST=tcp://localhost:2376
(I know that documentation says port 2375
but for some reason toolbox choose 2376
when it was installing) but with second scenario WSL is unable to find docker deamon and any command's throwing an error:
> docker info
Cannot connect to the Docker daemon at tcp://localhost:2376. Is the docker daemon running?
For a moment I thought that this might be a problem but I found many other tutorials where first config was used.
I've tried also running
python manage.py runserver 0.0.0.0:8000
python manage.py runserver 127.0.0.1:8000
python manage.py runserver 192.168.99.100:8000
I think I don't quite understand which ip is what and there is a problem but I also can't find any good answer to that.
I'm struggling with it for 2 days now so literally any hint will be priceless.
Thanks.
django windows-subsystem-for-linux docker-toolbox
I try to run my django project on local machine (on which I'm using WSL) using docker without using nginx or apache but with postgres as db and simple
python manage.py runserver
It seems that Docker itself works fine, I am able to create and run containers, logs show that all is up and running, I can ssh to both container with app and database but I can't reach it via my browser.
Internet says that I need to set up propertly network on VM so I did:
I'm setting my envs like that
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST=tcp://192.168.99.100:2376
export DOCKER_CERT_PATH='/path/to/mounted/dir/.docker/machine/machines/default'
export DOCKER_MACHINE_NAME="default"
export COMPOSE_CONVERT_WINDOWS_PATHS="true"
Some tutorials says that instead of DOCKER_HOST=tcp://192.168.99.100:2376
it should be DOCKER_HOST=tcp://localhost:2376
(I know that documentation says port 2375
but for some reason toolbox choose 2376
when it was installing) but with second scenario WSL is unable to find docker deamon and any command's throwing an error:
> docker info
Cannot connect to the Docker daemon at tcp://localhost:2376. Is the docker daemon running?
For a moment I thought that this might be a problem but I found many other tutorials where first config was used.
I've tried also running
python manage.py runserver 0.0.0.0:8000
python manage.py runserver 127.0.0.1:8000
python manage.py runserver 192.168.99.100:8000
I think I don't quite understand which ip is what and there is a problem but I also can't find any good answer to that.
I'm struggling with it for 2 days now so literally any hint will be priceless.
Thanks.
django windows-subsystem-for-linux docker-toolbox
django windows-subsystem-for-linux docker-toolbox
asked Nov 10 at 14:06
kebie
2618
2618
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53239756%2fdjango-run-on-docker-toolbox-with-wsl%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown