How to run Python scripts in a Docker container

preview_player
Показать описание
I showcase how to build and run Docker on windows. I create a ubuntu-based Docker Image and then run it to print "Hello World". To showcase the functionality I jump into the docker container and show some basic Linux functionality.

Commands:
Build a docker image:
docker build -t [tag] [dockerfile position]

Create and run a Docker container
docker run [docker image]

How to get into a docker container
docker run -it [docker image] /bin/bash

My channel publishes videos regarding programming, software engineering especially Java and JavaFX. If that is what you are looking for then do not hesitate to join me on this journey!

Subscribe to my YouTube channel:
Рекомендации по теме
Комментарии
Автор

I'm someone who doesn't know anything about Docker, and this video helped me understand a lot of concepts in 9 minutes, wow

SolomonLeo_
Автор

Best Docker tutorial of many I've watched, thanks!! (Ideal for people who already have a general sense of Docker's high-level architecture)

Julian-tfnj
Автор

Incredibly helpful. Keep up the great work!

edydon
Автор

Great tutorial, helped me to understand the basics.

mkrtichhovhannisyan
Автор

You are just awesome in explaining really simple. Please keep doing thank you very much. FEEDBACK: Please remove the blue background in the terminal. Not so clear to see what files are there when you clicked. If possible use white.

kartikeyareddyk
Автор

great tutorial for someone who knows concept of dockers but never used it

muhammadroshanmughees
Автор

Thank you so much bro. it is awesome explaining!!

cs_dequeue
Автор

Very Good tutorial, after watching this I am able to run the selenium pytest in the centos docker container.

srujjhanaadevy
Автор

Thank you for this well explained video. I have a question: where do I create my python environment, in or outside the container?

pluralvistamaar
Автор

I got the gist of docker in 9 crisp minutes only issue I faced was when we were in the container and we changed our code basically the python file. When we exited and ran the same image again the changes weren't visible, how to run so that changes that were made are visible?

karantiwari
Автор

I don't know why but there are entire sections where I'm only picking up parts of words audio wise. Is there an audio issue with the video?

dannythedabbler
Автор

Is the audio lagging or is that only my device?
The tutorial is pretty nice but I'm having a hard time with the audio. Lol

jentcold
Автор

How about libraries? Lets say I have to import pandas in the program. How do I add the dependency?

TheSubhayan
Автор

The bit I just do not get is right at the start: 'FROM ubuntu:latest', but we are on Windows and we keep being told that containers are not virtual machines! How did 'ubuntu' get in on the act and what would be the significance if we selected a different Linux distro as the base? Do we need to do anything different if we are running, say, on a Raspberry Pi?

john_hind
Автор

after running build command getting below error:
failed to compute cache key: "/main.py" not found: not found

pranitpawar
Автор

This video is great, thanks wonder if you could help me with saving the GNU nano where we edited the code

ruzanb
Автор

From this vid I get the sense that a Docker image with Ubuntu as base is kinda like a lightweight Ubuntu install. Makes me think of VMs and WSL/2

Can you give like an overview of Docker vs WSL vs VMs? I've tried searching but most answers are going over my head... 🤯

re.liable
Автор

The tutorial is pretty good but it will be a lot better if you could show the application first of all then use the docker and share and bring it out of the docker to like a production app if that makes sense. There are a lot of things missing. I am still not sure what the advantage of a docker is. It cannot display GUI, it needs requirement.txt, use relative paths (local file) etc. If you know the files required for an application, why can't you just focus on installing the right packages? Or is it, once you make an app (for ex an exe app) will it contain all the necessary files so you can share it with someone? If you develop an exe file you cant ask a novice to install docker and go through all the steps just to see it working, when you can do all of it on a virtual environment (minus sharing it with other users). I am very much lost and I hope it makes sense.

ajayjoseph
Автор

I know in this instance installing nano in the container doesn’t really make a difference but do not get in the habit of doing this. If you install something in the container manually make sure you add that to the Dockerfile.

TN-cxqi
welcome to shbcf.ru