https://github.com/davisdre/hostname-webapp
a web app that displays hostname.
https://github.com/davisdre/hostname-webapp
Last synced: 3 months ago
JSON representation
a web app that displays hostname.
- Host: GitHub
- URL: https://github.com/davisdre/hostname-webapp
- Owner: davisdre
- License: mit
- Created: 2024-09-04T03:04:34.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-15T20:13:10.000Z (9 months ago)
- Last Synced: 2025-01-18T18:52:17.076Z (4 months ago)
- Language: Dockerfile
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hostname Web App
This is a simple Python Flask application that displays the hostname of the Docker container on a web page.
## Prerequisites
- Docker
- Python 3.9 or later## Getting Started
### Clone the Repository
```shell
git clone https://github.com/davisdre/hostname-webapp.git
cd hostname-webapp
```### Build the Docker Image
Build the Docker image using the following command:
```shell
docker build -t hostname-webapp .
```### Build the Docker Container
Run the Docker container with the following command:
```shell
docker run -d -p 80:80 hostname-webapp
```### Access the Web Page
Open your web browser and navigate to `http://localhost` (or the IP address of your Docker host). You should see the hostname of the container displayed on the web page.## Files
- `app.py`: The main Flask application file.
- `Dockerfile`: The Dockerfile used to build the Docker image.## License
This project is licensed under the MIT License - see the LICENSE file for details.