Sign inSign up

davisdre/hostname-webapp

By davisdre

Updated about 2 years ago

A web app that displays hostname.

Image
0

230

davisdre/hostname-webapp repository overview

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
git clone https://github.com/davisdre/hostname-webapp.git
cd hostname-webapp
Build the Docker Image

Build the Docker image using the following command:

docker build -t hostname-webapp .
Build the Docker Container

Run the Docker container with the following command:

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.

Tag summary

Content type

Image

Digest

sha256:0985ec339

Size

22.2 MB

Last updated

about 2 years ago

docker pull davisdre/hostname-webapp