What is the difference between Flask and Docker? - docker

I am lost in these words. Watched a lot of videos and articles. But I am not able to understand the difference. Flask helps me to create web interface which can be used only on my local system. But what does docker do? Does it make the application visible to world with url? Requesting answer in very simple words..

Flask is a web framework in that it provides an API for the python language with which web applications can be built, such as a website or a backend service.
Docker is a containerization tool which deals with the deployment of applications and the environment in which they run. Docker provides a lightweight alternative to Virtual Machines - a lightweight software environment in which an application can run independently, with dependencies handled by Docker. Docker environments can vary in operating system, the programming language of the application being deployed, and more.
I may, for example, build a web application in python using libraries provided by the flask API, then deploy the application on a server in a docker environment running a Windows Operating system.

Related

Is it possible to do development of Dapr based applications without using Docker Desktop?

Based on the documentation for Dapr mentioned at :https://learn.microsoft.com/en-us/dotnet/architecture/dapr-for-net-developers/getting-started . It looks like Docker Desktop is mandatory perquisite as part of Dapr setup in local environment.
The Docker company recently announced that it would be making changes in its Docker Desktop subscription terms. With this update it is not possible to install Docker Desktop in the local development environment. Can anyone help me to know how to continue Dapr based application development without Docker Desktop in this case.
Can anyone help me here by providing their guidance?

Distribution of containerized applications to end users

I have containerized an application which is comprised of a Node.js application, Nginx, and MongoDB. I'm currently using Docker Compose to start and stop the application on my development machine.
I'd like to distribute the application, along with the volume that contains the MongoDB database files, so that an end user can easily start the application on their computer and point their web browser to it.
Some factors I'm considering:
The end user is almost certainly not familiar with containerization and is probably not comfortable playing around in a terminal.
The end user is likely to be using macOS or Windows, but Linux should be supported.
Asking the user to install Docker is possible, but I don't like that it requires Hyper-V on Windows, which conflicts with other software such as VirtualBox.
I could write a cross-platform GUI application that manages Docker with simple "start" and "stop" buttons. However, I am not married to using Docker if there is an easier path forward. Should I look into something like Facebook's executable archives?

What is the best way to host a MicroService .net core web api in Docker?

I have several micro services that I would like to dockerized them. Is it better to build them in a self-hosted console application or build asp.net web application?
Which one is faster?
My MicroServices are only simple Web Api.
Just gonna give you my experience on this, not necessarily a 'complete answer':
If you create a .NET Core WEB API in Visual Studio and 'Add Docker support', you can directly deploy them to regular AppServices (specify 'Linux' as the operating system when you CREATE the AppService).
The Visual Studio wizard will automatically setup the container registry for your images, and configure the appservice to deploy whenever there's a new tag for your image.
I've also migrated this same Web API to deploy to a Windows AppService without docker, we didn't need to change any of the code, just deploy it without docker as a regular web app.
Which means if you build this as a .NET CORE 2 Web API you can deploy the same code to either a Linux Appservice using Docker or to a regular Appservice.
If you're planning to use anything different than AppServices tho, you might want to check Container services or Service Fabric, which IIRC is more expensive (would make sense if you need to scale this massively)

Use Docker rather than native/homebrew on Mac?

I currently have a LAMP stack installed on my mac running through Homebrew, which, to be honest hardly ever get's used.
Lately I have been working a lot with AngularJS and service based apps, so generally run the sites through a gulp / nodeJS based webserver.
I am totally frontend orientated, so very rarely do I play with backend related technologies other than the odd Drupal site and mysql.
I am interested to learn more NodeJS, perhaps even some Ruby, purely to understand programming more - not really for it to become my new job description.
So reading up on NodeJS a bit last night I read a lot about Docker, and installed it the toolkit and gui this morning. It looks pretty neat!
My question is: Would it work better for me to just run everything I need through Docker? For example, I can just install the mysql container, and turn it on when I need a db, and just spin up a drupal instance when I need one and connect it to my db instance?
I understand that running Docker on Mac is slower as it doesn't have the native Linux kernel and runs through a VM - but considering my needs from it, this should be okay?
I love the idea of just deploying containers, so will probably want to install Docker on my hosting environment too (VM in the cloud).
Follow up question: 90% of the sites I work on are AngularJS based frontends that speak to APIs that our backend guys build separately. Would it be overkill to have a Docker for each of those sites, or would I rather just run them all in one, or just bypass docker entirely for that (as I mentioned, I normally just load them up from within my Gulp's webserver)
Thanks a lot. I realise this is a n00b asking questions about big technology, but I'm trying to wrap my head around it and hopefully grow a bit in the process.
The interest in deploying Docker container is reproducibility.
You can easily reproduce:
either a complex development environment requiring the installation of numerous libraries (that you don't want to pollute directly your host)
or an execution environment, for a given tool to run (like a web server)
If you are not likely to repeat a setup (for dev or exec), a docker container would bring little value.
But if you want to keep track of the exact specification of an environment (through its Dockerfile) and will deploy it not just on your workstation, but in other places as well, then docker is certainly a good option to consider.

OpenCV deployment on windows azure

Is it possible to deploy an OpenCV application to windows azure?
Open CV is comes into client application category accessible through user interface and also can be used for backend processing. Windows Azure Cloud services is used for web application so Open CV does not fit in the application model. For backend processing you may think to use cloud service as worker but that need lots of work on your part and defeat the purpose.
For the sake of completeness and possibility, you sure can get a Windows Azure Virtual Machine, along with Windows OS and deploy OpenCV application there. Once ready you can Remote Desktop to the VM and use it. You may pay monthly cost to use the VM but you sure can do it. But I am sure that is not your objective either.
Yes, I'll say its possible to install OpenCV applications to Azure.
Check the following Deep Learning VM
It comes with pre-installed software. Most of the machine learning libraries along with the OpenCV project are pre-installed
You can also use APIs to host your models on the Windows Azure

Resources