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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay