Closed swilliams closed 6 years ago
I spent some time troubleshooting this. I also can't hit it from my Mac (High Sierra). I tried hitting localhost:4000
, 127.0.0.1:4000
, 0.0.0.0:4000
, and messing around with the EXPOSE
and ports
settings and seeing if i could get to 80
. Haven't tried changing the jekyll config stuff yet (defaults to port 4000), and all my internet searches do is recommend to access it through the IP address of the docker container by running docker-machine ip
but that seems to be tied to running the container on a VM, which I'm not doing. That is how all the posts on stackoverflow fix it though, so maybe I'm missing something on how docker-machine
works.
I did try running docker inspect [container ID]
and using the IP address that way to hit [ip_address]:4000
but still no dice.
The message I get is The connection to the server was reset while the page was loading.
It seems to be a fairly common error that people hit when doing the intro Docker tutorial, but that intro worked for me, so I feel like there's just a small missing piece here. Although, I did have to use 0.0.0.0
instead of localhost
for the tutorial, and for this repo my laptop (which doesn't work, similarly to scott's iMac) binds to 127.0.0.1
.
🚨 You don't need to stand up the server via Docker. You can cd
into the docs
folder and then run jekyll directly via:
bundle exec jekyll server --config _local.yml
Note that you would still need ruby and bundler installed previously.
I can get the site to run on my laptop, but on my iMac (and @TinaHeiligers's computer) it errors out. Chrome replies with
ERR_EMPTY_RESPONSE
when you connect tolocalhost:4000
.This may be a clue, or it may be a red herring, but my iMac it binds to the address as
http://127.0.0.1:4000
and on my laptop (which works) it'shttp://0.0.0.0:4000
. Not sure why that's different.My laptop is on High Sierra and my iMac is on [sober] Sierra, but I don't think that would make a difference. Docker version is the same.
If you figure this one out, I'll take you to lunch.