New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to server from host machine. #91

Closed
JXPrime opened this Issue Feb 12, 2016 · 9 comments

Comments

2 participants
@JXPrime

JXPrime commented Feb 12, 2016

I'm new to Docker so it's probable I'm misunderstanding something.

I'm running Windows 10 and installed the Docker Toolbox. Clicking on the Docker QuickStart shell, and running the docker command seen in the screenshot below, I'm unable to connect to the server from the host machine.

image

However, if I run a Vagrant VM and run Jekyll from inside there, I'm able to connect:

image

Is there some bit of network configuration I've missed/misundertsood with Docker?

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks
Owner

envygeeks commented Feb 12, 2016

@JXPrime

This comment has been minimized.

Show comment
Hide comment
@JXPrime

JXPrime Feb 12, 2016

What's the difference, for the uneducated like myself? 😁

image

JXPrime commented Feb 12, 2016

What's the difference, for the uneducated like myself? 😁

image

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Feb 12, 2016

Owner

The difference that you should take out of all of that is the docker-machine stuff on the -p, Docker Toolbox uses Docker-Machine uses Virtualbox, you have to pull out your Virtualbox IP or let them get exposed entirely (as far as I'm aware.)

Don't blindly copy and paste that syntax, merge the -p docker-machine stuff (changing the port obviously 😉) into your original command and see if you can get to the instance.

Owner

envygeeks commented Feb 12, 2016

The difference that you should take out of all of that is the docker-machine stuff on the -p, Docker Toolbox uses Docker-Machine uses Virtualbox, you have to pull out your Virtualbox IP or let them get exposed entirely (as far as I'm aware.)

Don't blindly copy and paste that syntax, merge the -p docker-machine stuff (changing the port obviously 😉) into your original command and see if you can get to the instance.

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Feb 12, 2016

Owner

That said, if you aren't using Docker Machine -- through Docker Toolbox or otherwise, I don't know what's going on and this ticket will probably stalled until I can get onto a Windows machine, at which point I'll ask for you to provide as much as you can so I can replicate it on my machines.

Owner

envygeeks commented Feb 12, 2016

That said, if you aren't using Docker Machine -- through Docker Toolbox or otherwise, I don't know what's going on and this ticket will probably stalled until I can get onto a Windows machine, at which point I'll ask for you to provide as much as you can so I can replicate it on my machines.

@JXPrime

This comment has been minimized.

Show comment
Hide comment
@JXPrime

JXPrime Feb 12, 2016

Yea, any command I try now is giving me that same error (presumably) from Jekyll about the Permission denied. :/ Should I not be browsing to localhost:4567, but instead the ip given by the docker-machine ip command?

Screenshot for reference:
image

JXPrime commented Feb 12, 2016

Yea, any command I try now is giving me that same error (presumably) from Jekyll about the Permission denied. :/ Should I not be browsing to localhost:4567, but instead the ip given by the docker-machine ip command?

Screenshot for reference:
image

@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Feb 17, 2016

Owner

@JXPrime I honestly don't know for Windows and I have very little experience with Docker-Machine, but I will find out this weekend and make sure our documentation is complete for Docker Machine.

Owner

envygeeks commented Feb 17, 2016

@JXPrime I honestly don't know for Windows and I have very little experience with Docker-Machine, but I will find out this weekend and make sure our documentation is complete for Docker Machine.

@JXPrime

This comment has been minimized.

Show comment
Hide comment
@JXPrime

JXPrime Feb 17, 2016

No worries, I'm sure it's some bit of learning I missed along the way somewhere. 😊

JXPrime commented Feb 17, 2016

No worries, I'm sure it's some bit of learning I missed along the way somewhere. 😊

@JXPrime

This comment has been minimized.

Show comment
Hide comment
@JXPrime

JXPrime Feb 23, 2016

Something else I've noticed, is that none of the files on my local machine appear to exist inside the docker container...if you notice in my screenshot above, it says no configuration file was found, but there is one there. I've noticed also when doing the docker quickstarts, that the volume mapping has never worked for me.

JXPrime commented Feb 23, 2016

Something else I've noticed, is that none of the files on my local machine appear to exist inside the docker container...if you notice in my screenshot above, it says no configuration file was found, but there is one there. I've noticed also when doing the docker quickstarts, that the volume mapping has never worked for me.

@JXPrime

This comment has been minimized.

Show comment
Hide comment
@JXPrime

JXPrime Feb 23, 2016

I figured it out. 😊

By default docker-machine mounts the home directory (so c:\users\foo) as available inside the docker machine. My source code was outside that directory. I cloned my repo into a folder inside my home directory, and was able to get the jekyll image to serve the content (I no longer receive the permission error as before). This, combined with my assumption from before (about accessing the host vm, rather than the host machine) equals success:

image

Note I'm not browsing to localhost (my assumption before), but the ip of the docker-machine.

JXPrime commented Feb 23, 2016

I figured it out. 😊

By default docker-machine mounts the home directory (so c:\users\foo) as available inside the docker machine. My source code was outside that directory. I cloned my repo into a folder inside my home directory, and was able to get the jekyll image to serve the content (I no longer receive the permission error as before). This, combined with my assumption from before (about accessing the host vm, rather than the host machine) equals success:

image

Note I'm not browsing to localhost (my assumption before), but the ip of the docker-machine.

@JXPrime JXPrime closed this Feb 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment