Docker
Docker logo

Docker

I have been developing projects related to Augmented Intelligence as well as updating some of them on Github. As the projects on Python involves several different libraries therefore, we tend to practice separate virtual environments that assist to manage the cluster. However, this gets cumbersome for people as they have to clone the repository, create a virtual environment, and then test the project. Somehow they may find their system does require more built-in packages. The whole process to have a working application takes a prolonged time. Docker containers are way better than setting up multiple Virtual Machines.

Read: Virtual Machines Vs Containers

github vasant vohra

The Android projects can provide a .apk, the python can provide executables too. but, they can fail on the OS side. So, Docker containers have built-in Linux os. Also, the Docker images and containers help in easy deployment to the web. Therefore, its good to have a public docker image on the Docker hub repository for easy hosting on the web services. Additionally, encouraging everyone to set up projects in minutes.

I spent a few hours learning docker from this youtube playlist. Plus, read the following two blogs:-

  1. Docker best practices for Data Scientists.
  2. How docker can help you become a more effective Data Scientist?

I started creating my existing Django project's docker image via Dockerfile.

web app
Dockerfile

The main concepts involving Dockerfile are:-

  • Adopting the right light base image,
  • Copying the source code,
  • Changing the working directory,
  • Installing the necessary packages and libraries with no cache and trusted resource,
  • Mounting the host folder through volume,
  • Some initial environment variables such as PYTHONUNBUFFERED=1 which allows for log messages to be immediately dumped to the stream instead of being buffered.
  • Exposing the ports,
  • CMD for specific commands,
  • At last, having an entry point startup file (.sh).

Did you know Docker images are immutable?

docker-compose.yml file

They are read-only containers. ORM-based Django has an inbuilt SQLite database for storing data and authentication. Docker-compose yaml/yml file creates a multi-container app by sharing OS kernel and communication to DB through different open ports and mounting a host directory through volumes to save the modifications.

Next, I've been trying to deploy the docker image on the Azure web app service. And, there's probably something I'm doing wrong. Maybe creating Container Instances would solve. Also, I would learn to configure NGINX as a webserver. 

If you're an experienced Docker user please get in touch. Others let me know your views in the comments.

要查看或添加评论,请登录

Vasant Vohra的更多文章

  • Swiss-Life ????

    Swiss-Life ????

    12 Lessons from Living in Switzerland for 12 Months ?? Switzerland is Clean: The air feels fresher, the streets are…

    2 条评论
  • System Design - Conference Management

    System Design - Conference Management

    Goals of this article: To share the knowledge and wisdom I've gained through working on a web application that is…

  • EuroPython2022

    EuroPython2022

    Overview This is an article to share my wonderful experience participating in the EuroPython Conference in Dublin…

    2 条评论
  • Technical Solutions for Healthcare, Transportation, Mortgage Industries...

    Technical Solutions for Healthcare, Transportation, Mortgage Industries...

    one needs to solve problems which have a bigger impact in others life 2021 Indico.UN Largest Events, and conferencing…

    1 条评论
  • 7 steps for code reviewing via C3.

    7 steps for code reviewing via C3.

    Code reviewing is a fun activity within the team. Similar to taking a chilled beer with colleagues, the code review…

    3 条评论
  • Every developer must know...

    Every developer must know...

    Hello, my dear change-makers of society. In this article, I try to briefly explain the 5 basic SOLID Principles, every…

    3 条评论
  • Do you really know SCRUM?

    Do you really know SCRUM?

    Fail Fast, Learn Fast, Feedbacks I guess we all know about SCRUM, nearly every software company is being Agile and…

    4 条评论
  • WeighBridge-Indian Trucks ALPR

    WeighBridge-Indian Trucks ALPR

    Challenge Evident from the image on the right, Licence Plates in Indian trucks have variations. It's easy for humans to…

    1 条评论
  • Software Engineers support to ease COVID-19.

    Software Engineers support to ease COVID-19.

    Over the past few days, I've been thinking about how to contribute my skills and abilities to save not the world but…

    1 条评论
  • Waste Segregation -> Convolution Neural Network.

    Waste Segregation -> Convolution Neural Network.

    Challenge Waste management is a crucial concern in India. There is no automated waste segregation strategy at everyday…

    2 条评论

社区洞察

其他会员也浏览了