• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

Apache Dockerfile

December 25, 2019

This Docker image contains Apache (httpd), a web server.

Here’s the Dockerfile.

FROM httpd:2.4
COPY ./public-html/ /usr/local/apache2/htdocs/

FROM httpd:2.4 COPY ./public-html/ /usr/local/apache2/htdocs/

Build and run your Docker image.

docker build -t my-app .
docker run -dit --name my-running-app -p 8080:80 my-app

docker build -t my-app . docker run -dit --name my-running-app -p 8080:80 my-app

Visit http://localhost:8080 to view your app.

Filed Under: Cloud, Linux Tagged With: apache, build, docker, dockerfile, run

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023