I have the following Dockerfile
:
FROM ubuntu:latest
MAINTAINER Valter Silva
RUN apt-get update
RUN apt-get install -y apache2
ADD index.html /var/www/html/
CMD /usr/sbin/apache2ctl -D FOREGROUND
EXPOSE 22
EXPOSE 80
This is how I build my image
:
docker build --tags mob:latest .
Next, this is how I bring my container up:
docker run -d --name website mob
Then I check my container's ip via the following command:
docker network inspect bridge
I would like to execute a curl
on this ip to ensure that my website is up and running:
curl 172.17.0.2
But for some reason, my command keeps hanging. I'm not sure why this is happening. I'm running my docker
on a MacOS system.
-p
option.