Containerization is becoming more popular and widely used by developers in the software industry in recent years. Docker is still considered one of the top tools for creating containers by building Images between containerization platforms or cloud platforms. Containerizing is all about bundling up a software application/service and isolating it from the host environment such that it can run everywhere, be it an AMD or an ARM. Docker Cloud hosting has made it simple to bundle and share containers.
There will be situations where one wants to host and run these containers online in the cloud. For example, containerizing a webpage app and running in the cloud, such that it can be shared and visible to everyone. Many cloud providers allow you to build containers online for the given application and run it continuously. Alternatively, they allow the user to directly input the Image file and then create a container out of it. Let’s discusses the free platforms where one can deploy and run these Docker containers.
Learning Objectives
This article was published as a part of the Data Science Blogathon.
Hosting containerized applications on the cloud is the best way to share them with others and understand how well they can or must be scaled to make them available to millions of users with no connection lags. So many cloud platforms let you host your docker containers/applications. But most of these platforms either are not free or ask the users for their personal information, such as credit card details. Once, there used to be a platform called Heroku, which used to provide free hosting of applications in the cloud.
Heroku was very famous among all the developers for its free tier and its ease of use. But recently, Heroku removed its free tier, and now the time has come for the developers to search for its next successor. This article gives you information on four platforms that help you host containerized applications for free on the cloud without charging anything or asking for any personal information.
Zeet is a cloud platform for deploying DevOps-operated, production-ready cloud services. Any programmer can publish code on production-grade infrastructure with Zeet, a software platform developed on top of one’s AWS or GCP, thus eliminating the need for complex management of infrastructure. It, by default, supports many programming languages like Python, Node, etc.
Zeet allows its users to deploy apps/websites using Containers, which are run in a cluster managed by Zeet themselves. The Docker Image can be directly provided to Zeet to deploy it. Zeet is compatible with a range of programming languages.
Zeet has a free plan for developers. The following are included in this free plan:
The following are its disadvantages/limitations:
Zeet is been used by Mythia company as a replacement for AWS, thus saving hundreds of development hours. Fairgrounds company utilizing Zeet is trying to build an entire Metaverse and Paper company employing Zeet for checkout solution.
Fly.io is a new public cloud that make it simple to deploy/publish real-time apps close to target users, regardless of whether they might be present in the world. It is based on bare-metal servers that operate in data centers all over the world. Fly.io’s main motto is to deliver apps to end users with high availability and low-latency.
Fly.io doesn’t have anything like a free plan or free tier when it comes to their pricing section, but they allow the users to provide enough resources to run small full-stack websites/applications for free. One can host Containers on this website.
Fly.io takes in the application and its Dockerfile, which the user wants to host, then based on the Dockerfile, it builds the image and then hosts the following Container. The user can provide the pre-built Docker Image if it already exists. The free tier includes the following:
The free tier of fly.io includes the following limitations/disadvantages:
Many websites like reactrouter.com, kentcdodds.com, unpkg.com, and aiven.io leverage fly.io to host their websites so that their websites will be highly available to all users around the globe.
Before working with fly.io, one needs to install their command line tool called flyctl in the host operating system, and it can be done as follows:
# Installing flyctl in windows
$ powershell -Command "iwr https://fly.io/install.ps1 -useb | iex"
# Installing flyctl in Linux
$ curl -L https://fly.io/install.sh | sh
# Installing flyctl in Mac
$ brew install flyctl
Render is a fully managed seamless cloud platform that can be used to run the given app or website, providing a free TLS certificate, private network, and global CDN. It provides a variety of features, like managed databases, one-click deployments, automated scaling, and an easy-to-use UI. Provides easy integration with development tools like Docker and GitHub. Render provides native support for hosting containerized apps and services at scale.
Render has a free tier plan, which is a free tier plan, which can then be upgraded by increasing and complex computations. The free tier plan includes:
Disadvantages/limitations with respect to using Render include:
Companies like Indie Hackers, Pete for America, Zelos, etc. have chosen Render over AWS for its simplicity which eliminated a lot of infrastructure complexity and helped them with automatic builds and zero downtime deployment.
The railway is a cloud-based deployment platform enabling users to publish and host applications in the cloud. The railway takes care of managing these servers, and databases, thus taking care of the infrastructure. It supports various languages, including Python, Next.js, Node, and many others.
One of its key features is its support for Docker. During the build process, the Railway app looks for a Dockerfile, so it can build an Image for the application based on its config and run the following Container in the cloud.
The railway comes with a free-tier plan, which includes the following:
Disadvantages/limitations associated with this cloud platform include:
Railway is employed by different companies like Atmos, which deals with real estate home customization, and Zora, a company related to NFTs. Fion Tech provides Machine Learning models for fire prediction, Operand, and many more.
Let’s try deploying a simple Flask application to one of the platforms above. Here will deploy it to the Render platform. Let’s look at the sample code as well as the Dockerfile.
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello Flask App'
if __name__ == "__main__":
app.run(debug=True)
The above code will start a flask server and display the message “Hello Flask App.” Below is the Dockerfile, which will help build an Image for the simple Flask app. Upload both of these files to a GitHub Repository.
FROM python:3.10-slim
WORKDIR /flask_app
COPY . .
RUN pip install -r requirements.txt
ENV FLASK_DEBUG=1
EXPOSE 5000
CMD ["flask","run","--host=0.0.0.0"]
Thus, the app is working perfectly. This way, one can create an application, then create a respective Dockerfile, which Render uses to build an Image out of it and run it on the cloud.
Creating an application is one task, and deploying that on the cloud as a container is another. Most of the cloud platforms do not support Docker/containerization. They don’t usually have free tier/plans, even if they support them. Cloud services like AWS/GCP do allow you to deploy these Containers but ask the user to enter their credit card details. So this article focuses on those websites/cloud services which not only support containerization but at the same time allow the user to host them for free without providing the credit card and personal information.
Some of the key takeaways from this article include the following:
The media shown in this article is not owned by Analytics Vidhya and is used at the Author’s discretion.
Lorem ipsum dolor sit amet, consectetur adipiscing elit,