Docker VSCode Python Tutorial // Run your App in a Container

Docker VSCode Python Tutorial // Run your App in a Container

Christian Lempa

3 года назад

92,755 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Matthew Crosby
Matthew Crosby - 17.08.2023 01:13

Thanks for the tutorial. I wasn't able to run the docker container though as my repository didn't have a name created automatically. it just said <none>. Do you know what I did wrong?

Ответить
Sven Albert
Sven Albert - 03.08.2023 00:38

Ist ein "Remake" des Videos mit vscode dev containern geplant?

Ответить
Chuck
Chuck - 24.07.2023 16:45

Excellent video! Thanks! Been looking for this for ages but that is not the reason why I watched this video. I thought there was a way to write a program outside a docker container and run that same code in a linux environment of docker container despite being on windows.

Ответить
FocusInsight
FocusInsight - 18.07.2023 00:25

Interesting , I used ChatGPT today and within 30 mins created images from my scripts, containerized in docker and monitor with portainer if needed. :D Never heard of this VScode before today haha.

Ответить
renaud renaud
renaud renaud - 12.06.2023 03:33

Ha sorry, I tried, but Windows... I can't.

Ответить
Maxim Pobihun
Maxim Pobihun - 05.06.2023 13:04

It doesn't create settings.json when I create new python file on vscode

Ответить
זכריה Zach Fenton פנטון
זכריה Zach Fenton פנטון - 17.04.2023 04:30

Auf Deutsch bitte. Gern geschehen

Ответить
Longrolstral
Longrolstral - 03.04.2023 18:02

Great video. I wasn't using VSCode. I had to build the container again without the non-root user because the sqlite3 database I had was read-only.

Ответить
kr
kr - 22.03.2023 20:53

vs code has since changed a few times so this video just serves to compound the annoyance with building on microsoft

Ответить
bell canada
bell canada - 09.03.2023 18:45

there is no vscode when json settings when i refresh

Ответить
pythoneer
pythoneer - 28.01.2023 09:20

pywin32 will not work with this. No real solution

Ответить
Q
Q - 25.01.2023 07:29

Is there a way to mount host directories in the docker container? I have been searching for how to do this, but all I have pulled up is how to do it with "devcontainer.json." The process you showed in your video seems different for some reason.

Ответить
Clinton Phillips
Clinton Phillips - 20.11.2022 17:18

This is great bruh!

Ответить
API Logic Server
API Logic Server - 05.11.2022 17:55

Hi, Christian.... thanks for this, wish I had seen it when I got started. I was particularly interested in the ability to create containers using VSCode tasks.
You might be interested in API Logic Server - it creates executable web app projects from a database, including support for developing in docker, and creating docker containers.

Ответить
Manuel Orellana
Manuel Orellana - 27.10.2022 06:33

Hi, thanks for this info! I have a question though, what if you are using a library like pandas or matplotlib and need the intellisense to autocomplete or easily access the description of methods that are in libraries that get loaded into the image - container but are not installed locally? I know you can attach to a running container, but when you are building a simple app in python the container stops running right after the script finishes. is there anyway to attach to a container that is stopped to get these features? or the only solution is to install the libraries locally? thanks!

Ответить
Pierre Fransson
Pierre Fransson - 13.10.2022 16:17

Now when Docker Desktop costs money. Do you have any good solution on how to create a docker image without using a build pipeline? Is there any good way to do this on windows using WSL?

Ответить
VAHA
VAHA - 08.10.2022 21:31

very good

Ответить
Vincent Stevenson
Vincent Stevenson - 28.09.2022 16:23

I kept getting stuck on the debug part inside of the container within VS Code - thank you for being so informative!

Ответить
artabalt
artabalt - 13.09.2022 15:06

I have the problem that when I try to add and import a module, say "import numpy as np" it tells me that Pylance is not finding it. Any tips on how to fix that?

Ответить
Eran Otzap
Eran Otzap - 24.08.2022 17:49

is there a way to change the code and run again without building the entire container ?

Ответить
Mohammad Sharique
Mohammad Sharique - 14.08.2022 21:24

Thank you very for clarifying basic concepts of docker.

Ответить
Sowmya Ranjan Nayak
Sowmya Ranjan Nayak - 18.07.2022 12:27

Fast and clear, thank you very much.

Ответить
W H
W H - 26.06.2022 07:41

That's so helpful!!! I'm a total beginner and it really helped me step by step to build my first docker image!! Thank you!

Ответить
Surya's way of looking
Surya's way of looking - 24.06.2022 13:22

How can I do it if I have an input variable in the python script. please let me know. Thanks in prior.

Ответить
Learn With Me
Learn With Me - 18.05.2022 21:57

Hi, can anyone help me, I'm wrote my python code(for desktop app) in pycharm, I want to upload it to Microsoft, what steps should I follow?

Ответить
Kunjan Shah
Kunjan Shah - 18.05.2022 17:45

Can't install Ubuntu 20.04 LTS what to do?

Ответить
Y
Y - 14.04.2022 08:46

Will the files persist when you stop the containers?

Ответить
Y
Y - 14.04.2022 08:31

yes, would like to learn more about docker image pls

Ответить
Y
Y - 14.04.2022 08:09

do you have a version for Mac?

Ответить
Lucy Chan
Lucy Chan - 13.04.2022 23:32

I can't Thank you enough ,you just solved my problem <3

Ответить
nikki romero
nikki romero - 23.03.2022 18:47

Thanks for this video. Very useful

Ответить
Staali Skander
Staali Skander - 22.02.2022 18:19

thank you

Ответить
jowiedog
jowiedog - 11.02.2022 16:53

slightly expanded this example in python to output/print to a file. Any ideas how I would be able to save this output file to host machine, rather then container

Ответить
Saeed Rahman
Saeed Rahman - 15.01.2022 01:52

Thanks , this simplified everything.

Ответить
developer contact
developer contact - 06.01.2022 08:46

trying to follow simply explained tutorial but this no working on linux cause after pressing f1 the pop up (add docker to workspace) isnt showing how do i fix this sir

Ответить
Statistics Tell a Story
Statistics Tell a Story - 03.01.2022 22:42

Hello and thank you for posting. I am not very tech savvy, so perhaps you said this but I missed it, but we then have to run python INSIDE Of docker, correct? How do we do that? is there a line(s) in CMD? Thanks

Ответить
Faizan Batra
Faizan Batra - 22.12.2021 12:36

Hey Chris. Great Video. How do I deploy my container after I am done with development?

Ответить
Sadham Hussain
Sadham Hussain - 03.12.2021 16:56

Excellent excellent content.Thanks for sharing your knowledge.

Ответить
Paul Peters
Paul Peters - 04.11.2021 14:25

Thank you keeping the python example simple.

Ответить
Dylan R
Dylan R - 27.08.2021 05:39

Very informative and just what i was looking for. Thanks & subbed! :)

Ответить
No Woman No Cry
No Woman No Cry - 15.08.2021 13:00

To give Internet access for my container, I just need to add - -net=host right? How about give access of my host webcam to my container? My container python script uses opencv lib

Ответить
PrasinoXorton
PrasinoXorton - 10.08.2021 11:49

Hello Christian. I am now starting to get into docker and I have a question.
Aren't 116 MB for running a simple python application too much?
I think most of this space is the debian image that we are using to run the python script on.
Wouldn't be more space efficient to not have an entire os image to run the script?
Like having only the python bin in the container? Is this possible?

Ответить
Jetmir Haxhisefa
Jetmir Haxhisefa - 07.08.2021 23:32

Shouldn't you configure the python interpreted somehow to point to the docker container?

Ответить
Samarth Goyal
Samarth Goyal - 24.07.2021 17:51

Hi there, I tried to do the same with another python code, but when i run the image through the terminal, I get a
/bin/sh: 1: [python,: not found
error. Can you please help me out with this? Thanks.

Ответить
Grzegorz Kulikowski
Grzegorz Kulikowski - 29.06.2021 21:06

Really great video. Thank you

Ответить
Natália Matteoni
Natália Matteoni - 20.06.2021 02:04

"and because I don't have a very good example let's create a very simple application"
YES man
Tutorials that focus ONLY on what want to learn, just what we need!

Ответить
Gerard Klooster
Gerard Klooster - 10.05.2021 22:27

Nice video, just don't get it why you recommend ubuntu. In my experience the ubuntu mother, being Debian is much more stable, even if you use the testing branch.

Ответить
Ali Fnaiech
Ali Fnaiech - 10.05.2021 18:06

Waiting this video, thank you Christian! How about FastAPI ?

Ответить