Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Dockerizing Your FastAPI Python App: From Build to Running in Minutes | Running FastAPI on Docker

  • Python EveryDay
  • 2023-10-20
  • 211
Dockerizing Your FastAPI Python App: From Build to Running in Minutes | Running FastAPI on Docker
  • ok logo

Скачать Dockerizing Your FastAPI Python App: From Build to Running in Minutes | Running FastAPI on Docker бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Dockerizing Your FastAPI Python App: From Build to Running in Minutes | Running FastAPI on Docker или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Dockerizing Your FastAPI Python App: From Build to Running in Minutes | Running FastAPI on Docker бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Dockerizing Your FastAPI Python App: From Build to Running in Minutes | Running FastAPI on Docker

This is a docker image of python code that is running a fastapi server in it. It is built using the Azure DevOps pipeline. Let's see how?

Go to Azure DevOps. Create an organization. Create a project with any name you want to, let's name it projects and click on create. Go to repos, by default, a repo will be created with the name of the project. Click on initialize it, or create a new repo if you want to. create a new file, with the name requirements.txt. This file will be used to list & install all the python libraries required for the project. commit it. let's create another python file named main, any name can be given. let's write some basic code for fastapi. let's import the library fastapi. let's create an object of the fastapi and name it "app". let's add a get method to accept all the get requests. let's define a function named root. this function will return a message saying hello world. commit it. let's create another file named dockerfile. we will use the python 2 image as our basic image. we will build on top of it. let's create a directory with the name docker_python. And copy the requirement.txt to it. And also the main.py file to it. let's make this directory as the working directory of docker. let's install all the libraries listed in the requirements file. let's see if the library is installed by checking it's version. let's expose port 8000 of the machine which is required for the fastapi server. let's add the final command which will run the uvicorn server of the fastapi. commit it. go to pipelines. click on create pipeline. select azure repos. select the repository. Select any option you require, we are choosing the starter pipeline. it will create a basic pipeline for us. but we will search for and add some docker-related tasks to it which will generate an image of our code. we want to only build the image at this moment. let's define some arguments for tags that we want to be attached to the image. let's also add a tag name to the image, the image will show the same tag. Save the changes. go back to edit. click on validate to see if everything is okay. Now run the pipeline. the running job will be displayed. the two steps came from the starter pipeline. this is our task named docker. which is generating images. here we can see that the image is generated let's go back and remove those sample tasks. let's add another task to list all the docker images present on the machine. by running the command docker image ls. let's add a parameter to display our desired name. save it and run it. The job in the queue & is not starting. let's go one step back. here we can see that the pipeline got triggered when we committed. this pipeline has generated the image.
now our pipeline is also started. it has also generated the image with the name. To stop the pipeline from getting triggered automatically we can edit the trigger to none. We can also rename the pipeline to any name we want. let's see the executed pipeline in detail. let's go to the task which is building docker image. here it is pulling the python 3 image, it is the base image. then a directory is getting generated. required files are getting copied to it. the directory is chosen as the working directory. libraries listed in the requirements file are getting installed. the version of the installed library is also displayed, which confirms that it is installed properly. Then everything is converted to an image. our image with the tag specified is generated in the next stage we are using the docker image ls command to list out all the images available on the machine. all the images on the machine are listed below and our image is also in it.

For more related videos kindly visit:    / @pythoneveryday  

Subscribe for more updates:    / @pythoneveryday  

Python EveryDay!!!

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]