https://github.com/imsalmanmalik/deploy-static-html-website-as-nginx-container
Running a web server Nginx inside a Docker container and hosting a basic website.
https://github.com/imsalmanmalik/deploy-static-html-website-as-nginx-container
docker html nginx-server
Last synced: over 1 year ago
JSON representation
Running a web server Nginx inside a Docker container and hosting a basic website.
- Host: GitHub
- URL: https://github.com/imsalmanmalik/deploy-static-html-website-as-nginx-container
- Owner: imsalmanmalik
- License: apache-2.0
- Created: 2023-02-06T17:46:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-06T18:21:38.000Z (over 3 years ago)
- Last Synced: 2025-01-05T06:28:38.521Z (over 1 year ago)
- Topics: docker, html, nginx-server
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deploy-Static-HTML-Website-using-Nginx-Container
Running a web server Nginx inside a Docker container and hosting a basic website.
## Wrapping in a base image in the dockerfile
`FROM nginx:alpine`
## Copying files from current directory to Nginx web server public directory
`COPY . /usr/share/nginx/html`
## Building a Docker image
`Docker build -t webserver-image:v1 .`
## Running a Docker container
`docker run -d -p 80:80 webserver-image:v1`
## Checking for working container images
`docker ps`
## Checking memory usage
`docker stats`
## HTML starter template
`
Hello, world!
Hello, world! This is my Docker Container
`