Docker Image Not Working (MacOS Sierra)
I have tried to follow the apache docker image: $ docker run -d nextcloud
When I run this it will download all the items and run okay but then when navigating to http://localhost I get a "Server not found" error.
The above 2 images show my steps taken to get the image going.
As an update to the issue I just opened, I ran the following command and was able to see the server.
docker run -p 80:80 -d nextcloud
Not sure if this should be closed now or not, but I will leave this open since it is not documented in the main README.md file
With adding -p 80:80 you expose the port of the container to your host. Without this how should your host know that it should forward incoming traffic? However the container is running in a virtual network that is running on your host. So from the host you can reach the container by it's ip address or it's name. So if you use the simple run command the container gets an generated name wich you can find out with docker ps. You can reach the container by using its name as address in your browser.
@SnowMB we should probably add -p 80:80 to the docs. Because at the moment the docs just say run docker run -d nextcloud and acces it on http://localhost/. What do you think?
It is documented here: https://github.com/nextcloud/docker#http---insecure-just-for-development--debugging--testing
I was against to show everyone how to run an insecure nextcloud instance. And that's why I said I prefer to not say how to mount it on port 80.
But indeed, currently the doc is buggy.
Reconsidering it, I'd be ok to say it is on port 8080. Then it is not insecure by default, but still easy to use and understand. (Just opened a PR for that.)
Thanks for the input. Yea I am knew to Docker, this is one of the first uses of it for me so this is good to know. I was wondering how the networking would work to and from containers. I will run it on a different port and or use other means to secure it. Thanks.