You can get to know if your site is up and running in the following way,
Map both the ports of inside container to the host using -p option and try to curl localhost:port
Run your container with the following command,
docker run -d --name website -p 80:80 -p 22:22 mob
Explanation:- -p host_port:container's_port
Now, curl localhost:80 or ...
According to the docs tmpfs is linux only.
If you want "RAM only storage", you can literally use a RAM disk. ie:
diskutil erasevolume HFS+ 'DockerDisk' `hdiutil attach -nomount ram://2097152 `
Then you can point volumes at /Volumes/DockerDisk. Drop and recreate at will.
Docker will still store its VM and images on disk. See: Docker > ...
Restart docker, it falls into this state after the OS reboots.
The below thread mentions running it a swarm as preventing the issue from reoccurring and several ways to resolve the underlying OS issue with the software that may, or may not be workable for you.
If you are on win 7, you cannot use the current "docker for windows", which only works for win10 pro and server 2016.
Your only solution is to use the Docker Toolbox https://docs.docker.com/toolbox/overview/. Incidentally you must use it with Oracle's VirtualBox. But you don't need any virtual machine to make this work.
It depends on what you want to archive. If your container is intended to be accessed from outside, you need port mapping: -p $HOSTPORT:$CONTAINERPORT So you can use -p 80:80 as an argument for docker run to expose port 80.
If this is not the case (e.g. backend server that is accessed by a reverse proxy) you could simply use docker exec to execute your curl ...
Your command (curl 172.17.0.2 ) is hanging not due to expose port .It is clear
for security reasons, in Dockerfile EXPOSE command is not working, you need to manually need to add -p host_port:container_port in docker run command & it helps connect your container outside your machine.
If service is not running on 80 port , then you get message like this
It looks like you are using docker-machine instead of docker.
Get the environment commands for your new VM.
As noted in the output of the docker-machine create command, you need
to tell Docker to talk to the new machine. You can do this with the
docker-machine env command.