DEV Community

Cover image for How to Create Docker Image for HTTPD service, including portfolio web site.
Sanchitha Udana Wijesundara
Sanchitha Udana Wijesundara

Posted on

How to Create Docker Image for HTTPD service, including portfolio web site.

01. Create a Dockerfile inside your portfolio web site project folder.

that file name must be Dockerfile

02. Use the Base image as HTTPD
create the "Dockerfile" like below.

Image description

03. After create Dockerfile you can run below command to build the docker image

docker build -t imageName .
Enter fullscreen mode Exit fullscreen mode

04. After create docker image you can use to create docker container using below command.

docker run -d --name containerName -p 8080:80 imageName
Enter fullscreen mode Exit fullscreen mode

You can access the website using http://localhost:8080

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay