Dockerfile to install apache server and start httpd service on it.

0 votes

I'm trying to install Apache server and copy an index.html file from the host location to Docker container expose port 80 and start the httpd services. I need a Dockerfile for the same. Thank you 

Jan 22 in Docker by Kali
1,375 views

1 answer to this question.

0 votes

Hey @Kali, That's pretty simple. You could have a Dockerfile something like this:

FROM centos
RUN yum install httpd -y
COPY index.html /var/www/html/

CMD [“/usr/sbin/httpd”,” -D”,” FOREGROUND”]
EXPOSE 80
answered Jan 22 by Yesha

Related Questions In Docker

0 votes
1 answer
0 votes
1 answer

Dockerfile to install nginx on Ubuntu

Hey @Greg, this is a simple dockerfile ...READ MORE

answered Jul 23 in Docker by User101
176 views
+4 votes
4 answers

How To Access a Service on Host From a Docker Container?

Adding to kalgi's answer, You can also ...READ MORE

answered Oct 16, 2018 in Docker by lina
• 8,110 points

edited Oct 16, 2018 by lina 4,719 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,900 points
186 views
0 votes
1 answer
0 votes
1 answer