See the official Django documentation.įlask: Choose the path to where you create your Flask instance. If you created a python app with hello.py according to the Getting Started with Python tutorial, choose that.ĭjango: Choose manage.py (root folder) or subfolder_name/manage.py. This excludes the workspace folder you start from. For this tutorial, we'll focus on the Python: General case, but will also include notes for Django and Flask.Įnter the relative path to the app's entry point. When prompted for the app type, select Python: Django, Python: Flask, or Python: General as the app type. Open the Command Palette ( ⇧⌘P (Windows, Linux Ctrl+Shift+P)) and choose Docker: Add Docker Files to Workspace.: Note: For this tutorial, be sure to use the tutorial branch of the sample repos.Īfter verifying your app runs properly, you can now containerize your application. Python-sample-vscode-flask-tutorial, which is the result of following the Flask Tutorial Python-sample-vscode-django-tutorial, which is the result of following the Django Tutorial Note: If you want to containerize a complete Django or Flask web app, you can start with one of the following samples: If you don't have a Python project already, follow the tutorial Getting started with Python. To install the extension, open the Extensions view ( ⇧⌘X (Windows, Linux Ctrl+Shift+X)), search for docker to filter results and select Docker extension authored by Microsoft. On Linux, you should also enable Docker CLI for the non-root user account that will be used to run VS Code. Install Docker on your machine and add it to the system path.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |