This project is a demonstration of an Express application that publishes static web pages. The web site runs on port 8080
.
The web pages are stored in the directory /public
of the project root.
npm install
npm start
You'll output similar to the following:
2022-10-04T18:33:36.002Z info: Node server is running on port 8080 at Tue Oct 04 2022 11:33:36 GMT-0700 (Pacific Daylight Time)
In a web browser enter the following URL:
http://localhost:8080
Navigate to the source code directory in a terminal window.
Then run the following command to create the container image.
buildah bud -t simplesite -f Containerfile .
Follow up with the command to run the container in the background against that image.
podman run -d -p 8080:8080 simplesite
Test that the container is operating properly
Navigate to the source code directory in a terminal window.
Then run the following command to create the container image.
docker build -t simplesite -f Containerfile .
Follow up with the command to run the container in the background against that image.
docker container run -d -p 8080:8080 simplesite
Test that the container is operating properly
curl localhost:8080
You will get a response similar to the following: