Cant get a Docker image with apache to display the test webpage -


i have docker image have put apache. want when container starts, apache starts , can visit test page. however, page not appearing when try.

this current dockerfile:

from centos:7 maintainer me <me@me.com> run yum update -y && yum install -y httpd php run (cd /lib/systemd/system/sysinit.target.wants/; in *; [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \  rm -f /lib/systemd/system/multi-user.target.wants/*;\ rm -f /etc/systemd/system/*.wants/*;\ rm -f /lib/systemd/system/local-fs.target.wants/*; \ rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ rm -f /lib/systemd/system/basic.target.wants/*;\ rm -f /lib/systemd/system/anaconda.target.wants/*; volume [ "/sys/fs/cgroup" ] expose 80 expose 443 cmd ["/usr/sbin/init"] cmd ["/usr/sbin/httpd", "-d", "foreground"] 

i running container command docker run -d -p <container_name>, , when docker ps, see ports section being populated correctly, 0.0.0.0:32784->80/tcp, 0.0.0.0:32783->443/tcp output.

the url im trying use access 172.17.0.2:32784.

any ideas?

turns out issue was trying connect docker containers ip, when ip shouldve been connecting ip of server hosted on.

derp.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -