About | Features | Technologies | Requirements | Starting | License | Author
Automate the process of launching a container. This container should be running a service that returns some sort of HTML (“Hello World”) when browsed from localhost. Assumptions:
The core of the tool will be some code (Python, .Net, etc.) that can be executed and that will connect to the docker API (or other container daemon) and launch a container running apache (or web server of choice) to deliver a single web page. There is no need for dynamic input, all variables can be static.
The following tools were used in this project:
Before starting 🏁, you need to have Git and Node installed.
# Clone this project
$ git clone https://github.com/jordanistan/commure
# Access
$ cd commure
# Install dependencies
$ pip install -r requirements.txt
# Run the project
$ python3 main.py
# The server will initialize in the <http://localhost:80>
$ python3 main.py
Here is what the python script will output:
#############################################################################################################/n
Go to `http://localhost:80` in a browser to see the website!
Container ID: d66d5afdf942e733c050cb57bd4318b9f75943a5490369c2f19adba9ea63e803
Container Status: running
#############################################################################################################
Let's curl localhost
to make sure we are seeing the HTML output of the docker container.
$ curl localhost:80
<html>
<head>
<title>Commure Rocks!</title>
</head>
<style>
body {
background-image: url(https://www.commure.com/wp-content/uploads/2022/10/Hero-Image.png);
background-size: cover;
background-repeat: no-repeat;
}
.center {
text-align: center;
}
</style>
<body>
<div class="center">
<h1>Commure Rocks! WOot WOOt!! </h1>
<h2> Powered by Awesomeness </h2>
<button onclick="window.location.href = 'https://www.commure.com/';">Want to know more? Click Me</button>
</div>
</body>
</html>
This project is under license from MIT. For more details, see the LICENSE file.
Made with ❤️ by Jordan Robison