Docker | How to Dockerize a Django application (Beginners Guide)

  Рет қаралды 123,593

Very Academy

Very Academy

Күн бұрын

Пікірлер: 157
@veryacademy
@veryacademy 3 жыл бұрын
##### CAN YOU SPOT THE ERROR IN THIS TUTORIAL? It is April 1st here don't forget! 😜 The docker ignore file does not have 2 dots 😂 - just .dockerignore and should read venv not */venv #####
@olivierchabaut6515
@olivierchabaut6515 3 жыл бұрын
HAHAHAHAHA SO FUNNY !!!! HE CHANGED THE NAME OF THE FILE OMFG 😂😂😂😂😂😂😂😂😂😂😂😂
@nSiLEtan
@nSiLEtan 3 жыл бұрын
@@olivierchabaut6515 a kto to przyszedł? pan maruda niszczyciel dobrej zabawy pogromca uśmiechów dzieci
@gober4662
@gober4662 3 жыл бұрын
thanks for all
@sanjaygupta5636
@sanjaygupta5636 2 жыл бұрын
And this took me an hour to figure out :(
@sumanlamichhane5051
@sumanlamichhane5051 2 жыл бұрын
vs code doesn't allowed to save file as double dot..i was wondering at first haha
@ReneAshu-fb5fd
@ReneAshu-fb5fd 6 ай бұрын
This guy is the BEST teacher. He is a MUST WATCH and follow. Don't go anywhere else. Save this guy at all cost. We who are self thought all know the frustration of looking for a teacher who syncs with you. You have found it here, don't waste your precious time elsewhere.
@moondays7907
@moondays7907 3 жыл бұрын
I don't get it why you have just 159 likes, guys make it 10K immediately!!
@hassanelabdallah5013
@hassanelabdallah5013 3 жыл бұрын
2 days i asked you about docker, and you posted a video about it today. Thank you very much ❤️
@veryacademy
@veryacademy 3 жыл бұрын
Sorry you waited so long! 😜👍
@saikatmukherjee8095
@saikatmukherjee8095 3 жыл бұрын
@@veryacademy sir , sir we are faceing many issue in pytest ....is there any blog or someyhing to help ? plz plz i badly need it
@veryacademy
@veryacademy 3 жыл бұрын
@@saikatmukherjee8095 Sorry I don't have a blog or anything
@saikatmukherjee8095
@saikatmukherjee8095 3 жыл бұрын
@@veryacademy okk sir...but your videos ...are very helpful
@DS-bz4mz
@DS-bz4mz 2 жыл бұрын
Brilliant tutorial: easy to follow, explaining everything you need to know to get started without getting into unnecessary details and, I can't stress this one enough - the font is zoomed in enough to be readable in split screen. Thank you
@usmanafridi9668
@usmanafridi9668 2 жыл бұрын
I had lots of ambiguities about Docker and tried many times to download it and then delete it because I didn't know how to use it and what it is used for. This is by far the best tutorial about Docker for beginners. I thank you for making this video.
@raminasady719
@raminasady719 Жыл бұрын
This video was really helpful. Docker file is different from a programming language or framework to another. It's also depends on the dependencies and requirements of a specific project. So, it was very important to me find a tutorial that helps me configure docker file for my Django project. Thank to Zander I managed to run my first docker container.
@Crunchy409
@Crunchy409 Ай бұрын
This is outstanding- appreciate you explaining in a simple way
@fernandofranco8836
@fernandofranco8836 2 жыл бұрын
honestly, this is the best content I could find on youtube about the topic, Thanks!!!
@pgallovich
@pgallovich 3 жыл бұрын
This series is gold!! Thank you so much. I’ve been looking for an awesome Docker course. Now I have one.
@veryacademy
@veryacademy 3 жыл бұрын
Great to hear!
@dowaynebreedt2576
@dowaynebreedt2576 Жыл бұрын
Thanks for this video, so many tutorials out there seem to be copied from the same source, and all try to crutch on compose files without actually explaining them, this is the one place on the internet where it's explaned how to run a django project in a regular Dockerfile setup, rather than compose.
@shreyashsrivastava5467
@shreyashsrivastava5467 3 жыл бұрын
We need more this kind of video, Please consider making a video on docker-compose. Thank You.
@veryacademy
@veryacademy 3 жыл бұрын
Noted
@EdchelStephenNini
@EdchelStephenNini Ай бұрын
Thank you for a great video explanation!
@felixfigueroa
@felixfigueroa 3 жыл бұрын
I just got to your channel ... I'm going to enjoy this excellent docker tutorial ... I think your channel has excellent audiovisual quality, I'm subscribed Zander..! I´ll enjoy all your content ... thanks so much once again ... and a lot success!
@veryacademy
@veryacademy 3 жыл бұрын
Awesome, thank you!
@linatroshka
@linatroshka Жыл бұрын
Great tutorial! I've used a more recent Python image and followed it on a Mac, but it all worked for me. Many thanks for doing this!
@mrmuranga
@mrmuranga 3 жыл бұрын
hooked on your tutorials....nice and easy pace..thanks
@veryacademy
@veryacademy 3 жыл бұрын
Glad you like them!
@kiorepaul6278
@kiorepaul6278 2 жыл бұрын
Thank you for all the great tutorials👏👏👏
@veryacademy
@veryacademy 2 жыл бұрын
You are so welcome!
@gopesh97
@gopesh97 Жыл бұрын
Thank you Very much. This tutorial saved a lot of my time. Kudos to you for such a neat and simple explanation!!
@alokgupta168
@alokgupta168 2 жыл бұрын
the best video on docker and django !!!
@thisissifumwike
@thisissifumwike 2 жыл бұрын
EXTREMELY USEFUL.. THIS REAALLY GOT ME TO UNDERSTAND.. THANKSSS
@JustJiril
@JustJiril 2 жыл бұрын
Thanks Zander for amazing content. This is the most amazing channel when it comes to python tutorials. You are real gem contributing to the community. Cheers and keep up the good work.
@veryacademy
@veryacademy 2 жыл бұрын
You're very welcome! Thank you!
@maulanaajiw6184
@maulanaajiw6184 Жыл бұрын
Thank you sir. This tutorial work to my application 👍👍
@DanielADickey
@DanielADickey Жыл бұрын
Very good, thank you!
@veryacademy
@veryacademy Жыл бұрын
Glad you liked it!
@phichayaphakphiphitphatpha3695
@phichayaphakphiphitphatpha3695 10 ай бұрын
Very thank Zander, good content.
@Brocollipy
@Brocollipy Жыл бұрын
Another great video! Many thanks. I tried Docker a while ago but ran t the deep end and it just seemed overly complicated.. but starting with a basic project has been a great way to see it.
@vicesodan
@vicesodan 3 жыл бұрын
Great tutorial, saved my life. Since my Django project was way bigger I had some requirements which were not been able to build, if anyone comes across same error adding this code to Dockerfile worked for me: RUN apt-get update && apt-get install -y --no-install-recommends \ unixodbc-dev \ unixodbc \ libpq-dev
@toufikbenkhelifa917
@toufikbenkhelifa917 2 жыл бұрын
copy past on dockerfile ?
@henriquemoreiraamorim1333
@henriquemoreiraamorim1333 2 жыл бұрын
Your explanation is very good, thank you!
@veryacademy
@veryacademy 2 жыл бұрын
Thank you
@professionalfacepuncher8361
@professionalfacepuncher8361 3 жыл бұрын
thank you as always!! amazing explanation
@veryacademy
@veryacademy 3 жыл бұрын
👍
@manuelpineda402
@manuelpineda402 2 жыл бұрын
What an amazing course!! Thank you very much! You are excellent teacher!
@yourcasualdeveloper
@yourcasualdeveloper 2 жыл бұрын
What a clear tutorial I really loved it. Thank you so much
@timeforrice
@timeforrice 11 ай бұрын
This is an amazing tut!! Thank you
@Kruiger1993
@Kruiger1993 2 жыл бұрын
Well Explained Mate Thanks You!
@jonathanlloyd8688
@jonathanlloyd8688 Жыл бұрын
OMG yes so simple and sweet thank you!
@rangabharath4253
@rangabharath4253 3 жыл бұрын
Awesome as always 👍😀
@veryacademy
@veryacademy 3 жыл бұрын
Thanks again!
@arunima2916
@arunima2916 3 жыл бұрын
Great tutorial, I really appreciate your explanation. 👍👍
@veryacademy
@veryacademy 3 жыл бұрын
Glad it was helpful! 👍
@djangodeveloper07
@djangodeveloper07 2 жыл бұрын
easy to follow. brilliant explanation.
@anandnambissan
@anandnambissan Жыл бұрын
Great Video, Thanks for your effort
@veryacademy
@veryacademy Жыл бұрын
My pleasure!
@guidomedina5834
@guidomedina5834 3 жыл бұрын
Thank you Zander!! Badass name btw
@veryacademy
@veryacademy 3 жыл бұрын
😀 thanks
@AliMulla
@AliMulla 3 жыл бұрын
as always, you've explained it all so well. I'll be trying this on a raspberry pi 🙏
@veryacademy
@veryacademy 3 жыл бұрын
Long time no see - hope you are well. Let me know how you get on! Presume you have a newer version with enough RAM 👍
@AliMulla
@AliMulla 3 жыл бұрын
​@@veryacademy Thank you Zander. All is well, I hope you are doing good too. It all worked fine but yes the RPi3b is a little slow at take off :-) I have a pi4 too I will try it on. might be worth mentioning that people can run the command using -d to leave the terminal window free to do other things or shut down. On to your next tutorial ... Thanks again for all your brilliant tutorials and keep up the great work
@ExponiendoalosLacayosMen-tw2no
@ExponiendoalosLacayosMen-tw2no 2 ай бұрын
I could experience the problems of not using Docker very clearly one day. I developed one django app in my linux machine. Then I thought I could just copy the entire project and make it run on windows machine using pycharm. Catastrophic, all kinds of errors, I could not launch the application, it would not even recognize the python interpreter.
@amoriblain3655
@amoriblain3655 Жыл бұрын
Great job man, thank you very much!
@kisekkaalexander143
@kisekkaalexander143 2 жыл бұрын
Very clear explanation, thanks alot 😊
@liorbm1
@liorbm1 3 жыл бұрын
Oh this is GREAT !
@veryacademy
@veryacademy 3 жыл бұрын
👍
@mehdismaeili3743
@mehdismaeili3743 6 ай бұрын
Excellent .
@jeancharlles9
@jeancharlles9 Жыл бұрын
Excelent!!😀
@stochasticc
@stochasticc 3 жыл бұрын
Awesome tutorial!
@andynelson2340
@andynelson2340 2 жыл бұрын
Awesome, thanks! Well explained.
@evanswang8401
@evanswang8401 3 жыл бұрын
really helpful! thank you
@veryacademy
@veryacademy 3 жыл бұрын
Glad it was helpful!
@nastygambler2522
@nastygambler2522 3 жыл бұрын
Thanks 👍👍 ... Waiting for the database integration with django and docker
@veryacademy
@veryacademy 3 жыл бұрын
Will record that tonight if all goes well. That is part 2 - Docker compose. Will go straight into PostgreSQL setup. Then part-3 using volumes so that you can work with docker in a 'live container environment'.
@nastygambler2522
@nastygambler2522 3 жыл бұрын
@@veryacademy thanks a lot
@gbrachetta
@gbrachetta 3 жыл бұрын
@@veryacademy How about a part four: "deploying django in a docker container"? :)
@necuspam
@necuspam 9 ай бұрын
some things might be not so easy on WIN10... for instance, when several installations of python are present on computer. .\venv\Scripts\activate for instance, default port might be forbidden and some other can be used. It was somewhat messy while defining settings, uls, views and templates file. Maybe gitignore would be an option if everything is versioned... When building image, it can be seen it was already run in the terminal... however, more clear syntax would be: docker build -t 'python-django' -f Dockerfile . In video, when running container, it is not clear which port is host, and which is container. Besides that, very nice explaining, I would dare to say the best available on this topic. However, I would suggest to mention more possible issues that could appear during the process.
@rebel5387
@rebel5387 Жыл бұрын
So thanks you
@vaclemor102
@vaclemor102 3 жыл бұрын
Dude thank you !!!!!
@veryacademy
@veryacademy 3 жыл бұрын
No problem!
@hfiliz71
@hfiliz71 Жыл бұрын
golden! thank you!
@samandarshoyimov5580
@samandarshoyimov5580 2 жыл бұрын
Thnaka
@namesare4fools
@namesare4fools 3 жыл бұрын
you are very generous !
@veryacademy
@veryacademy 3 жыл бұрын
👍
@piyushmahapatra5402
@piyushmahapatra5402 3 жыл бұрын
I can't wait to finish all the courses in your channel but i dont get enough time! ugh.
@veryacademy
@veryacademy 3 жыл бұрын
I know how you feel! I want to get them finished!
@ThabeloManeta
@ThabeloManeta Жыл бұрын
thank you man
@Alireza10Rezaei10
@Alireza10Rezaei10 3 жыл бұрын
that's great ... thanks a lot.
@veryacademy
@veryacademy 3 жыл бұрын
You are welcome!
@manifz90
@manifz90 3 жыл бұрын
Thanks a lot
@veryacademy
@veryacademy 3 жыл бұрын
Most welcome
@sohamnavadiya992
@sohamnavadiya992 3 жыл бұрын
Thank you for sharing such a great video. It helped me alot to understand many ways. I would request to post one video on docker with celery, rabbitmq, nginx
@veryacademy
@veryacademy 3 жыл бұрын
I will do them all 👍
@dodokwak
@dodokwak 2 жыл бұрын
Thank you very much.
@veryacademy
@veryacademy 2 жыл бұрын
Welcome 😊
@yarlagaddanagaraju3244
@yarlagaddanagaraju3244 2 жыл бұрын
pretty explaination dear ... :)
@MrTomro
@MrTomro 2 жыл бұрын
Awesome
@smitpatel1358
@smitpatel1358 2 жыл бұрын
Amazing!!!
@AcademyOmen
@AcademyOmen 3 жыл бұрын
Finally, some blue 🚬.. Thanks Sir
@veryacademy
@veryacademy 3 жыл бұрын
Enjoy!
@gbrachetta
@gbrachetta 3 жыл бұрын
Thank you for this! But I imagine this is not usable during development, right? I mean, we have to rebuild every time we make changes to see those. Or am I missing something?
@veryacademy
@veryacademy 3 жыл бұрын
I will show you the way in part 3 😎 sure you can 👍
@gbrachetta
@gbrachetta 3 жыл бұрын
@@veryacademy Cool! Looking forward!
@johnnwabuforudemezue1108
@johnnwabuforudemezue1108 2 жыл бұрын
Thanks bro, God bless
@veryacademy
@veryacademy 2 жыл бұрын
Thank you too
@alokgupta168
@alokgupta168 2 жыл бұрын
It is not correct to say that if a django app runs fine on the local machine and after containerizing it if the container runs on AWS/Azure then the app will run fine on AWS/Azure. Not true. In docker we are just talking about running the container on different environments so as to collaborate. But there is no guarantee that the app will run the same in the runtime environment of the server as it ran on the localhost
@jamoliddinibrohimov3514
@jamoliddinibrohimov3514 Жыл бұрын
Super
@mediatwinkleTV
@mediatwinkleTV 3 жыл бұрын
Can you add a follow up video showing how to serve static/media files ?
@julianmayr277
@julianmayr277 3 жыл бұрын
That would be awesome!
@HyperCazual
@HyperCazual Жыл бұрын
python: can't open file '/a/manage.py': [Errno 2] No such file or directory
@jamiexue
@jamiexue 3 жыл бұрын
thank you!
@veryacademy
@veryacademy 3 жыл бұрын
You're welcome!
@oleg6791
@oleg6791 3 жыл бұрын
so good, ty a lot
@alihusham1560
@alihusham1560 3 жыл бұрын
Every time I install a new package the compose run again and I should wait for it too long? is that how it works or there is some wrong ?
@DanSevigny
@DanSevigny 2 жыл бұрын
How does one use docker to deploy Django to a service like Linode, Heroku, Etc?
@park47878
@park47878 3 жыл бұрын
Thanks a lot!
@pranavingale6850
@pranavingale6850 8 ай бұрын
/bin/sh: 1: [python, : not found....? And yes i used double quotes instead of single in CMD.....any help?
@b_etl
@b_etl 3 жыл бұрын
@Zander Thanks for this tutorial. Please what's the difference between virtual environment and docker? thanks.
@veryacademy
@veryacademy 3 жыл бұрын
Here is a good resource - if not get back to me www.simplilearn.com/tutorials/docker-tutorial/docker-vs-virtual-machine
@b_etl
@b_etl 3 жыл бұрын
@@veryacademy The article was informative now I clearly understand the difference. Thanks.
@alexdin1565
@alexdin1565 6 ай бұрын
[lease can you make video on how we deploy django with docker
@giannifed
@giannifed 3 жыл бұрын
thank you sir
@veryacademy
@veryacademy 3 жыл бұрын
Most welcome
@aldot1532
@aldot1532 2 жыл бұрын
when you use COPY . . is it going to COPY again the requirements.txt that you already copied before? Why is it necessary to COPY the requirements.txt before the overall command COPY . . ?
@serious6037
@serious6037 2 жыл бұрын
Is there a way to run Vm without hyper-v? i got this situation where my pc cant have hyper-v
@gongjiaji2489
@gongjiaji2489 2 жыл бұрын
if i run your docker file on a server, how do I make it accessible by others ? do I need something like nginx ?
@RahulChauhanart
@RahulChauhanart 3 жыл бұрын
Make a series on Flask just like you made one for Django
@veryacademy
@veryacademy 3 жыл бұрын
Thanks Rahul, when the time comes I will do more Flask, I have such a small windows of time to make these it is impossible to do to much at the minute. 👍
@aljon7992
@aljon7992 3 жыл бұрын
hello when I run docker run --publish 8000:8000 aljon-django after the build. Disregard the image name the result is Watching for file changes with StatReloader
@jhoanmartinezsilva2609
@jhoanmartinezsilva2609 3 жыл бұрын
Huge thanks
@veryacademy
@veryacademy 3 жыл бұрын
👍
@surajotari1456
@surajotari1456 3 жыл бұрын
how can i configure jenkins job for cicd. it would be really helpful if you can make video for same. thanks in advanse
@anilyadav-ln8qu
@anilyadav-ln8qu Жыл бұрын
thnx u
@Conormcnproductions
@Conormcnproductions 2 жыл бұрын
I thought that runserver was really built for development and is not wise to use in production
@saikrishnanar9291
@saikrishnanar9291 2 жыл бұрын
when I provide docker run --publish 8000:8000 python-django, I am stuck at this : "Watching for file changes with StatReloader" . How to fix this ? Thanks ! :)
@mrgriboman371
@mrgriboman371 2 жыл бұрын
Hello, when I try to do docker build it gives me the following error "Could not find a version that satisfies the requirement rest_framework==latest (from versions: none)" and I have no idea what should I do. Could anyone help please?
@PP-tc1zp
@PP-tc1zp 3 жыл бұрын
Hi, please help After command: docker build --tag python-django . I have: 'docker' is not recognized as an internal or external command, operable program or batch file. How fix this?
@veryacademy
@veryacademy 3 жыл бұрын
if you just installed docker - might need restart. Else docker is not in the path so you cant call it from the terminal, one of many solutions. Try installing docker again.
@junzezhang7360
@junzezhang7360 2 жыл бұрын
Could you explain how to solve ''You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, sessions." ?
@veryacademy
@veryacademy 2 жыл бұрын
Python3 manage.py migrate (type this in terminal)
@junzezhang7360
@junzezhang7360 2 жыл бұрын
@@veryacademy Thank you so much for the reply. Could/should we include this command in our Dockerfile/docker-compose? Should we do this with `docker exec` in the container Or do we just do this manually before we build a new container?
@suggu_sandeep_passion
@suggu_sandeep_passion 3 жыл бұрын
i didnt understand docker ignore file
@veryacademy
@veryacademy 3 жыл бұрын
If there are any files you don’t want to be part of your docker image you define it in the docker ignore file. So for example you might make a new docker image from a project folder, in that folder you have some notes files you use to help you work, you don’t want this part of your docker image when you build one, so you ignore those files by defining in the ignore file
@mehranj73
@mehranj73 3 жыл бұрын
Is there any reason why you are renewing this tutorial? I have already watched the old one.
@veryacademy
@veryacademy 3 жыл бұрын
These will be the 2021 refresh - I will remove the old ones eventually. I am building a whole course also at the minute which will lead us on to Kubernetes. I also missed a few important points in the first tutorials and had some other feedback which will guide me on the next few tutorials. I also want to keep the google algorithm happy with content. This content is also quick to build at night when I am tired and can’t focus on anything too heavy. 👍
@mehranj73
@mehranj73 3 жыл бұрын
@@veryacademy It's awesome, no complaints from me. Are you also going to add daphne for deployment of django channels app? BTW I tried to deploy a docker app using your and some other tutorials and codes but I got an error that I don't have permission to create or change the sqlite file. I couldn't find any solution to my problem. I didn't know what I was missing, I was using the root user.
@timothymalahy7880
@timothymalahy7880 3 жыл бұрын
Is this something I could follow on linux?
@veryacademy
@veryacademy 3 жыл бұрын
Noted. I did aim to also perform the same tasks on linux.
@ghiathos
@ghiathos 2 жыл бұрын
Hello, Can you share .env.sample :)
@veryacademy
@veryacademy 2 жыл бұрын
Sorry, I don't have it.
@legohistory
@legohistory 2 жыл бұрын
Really..? A april fool in a tutorial?
@abirulezz
@abirulezz 3 жыл бұрын
I get 'ERR_EMPTY_RESPONSE', any help here?
@adinapunyobanerjee9481
@adinapunyobanerjee9481 Жыл бұрын
Me too!
Docker | How to Dockerize a React application (Beginners Guide)
19:57
The Joker wanted to stand at the front, but unexpectedly was beaten up by Officer Rabbit
00:12
Ozoda - Lada (Official Music Video)
06:07
Ozoda
Рет қаралды 7 МЛН
Electric Flying Bird with Hanging Wire Automatic for Ceiling Parrot
00:15
Docker Tutorial For Beginners - How To Containerize Python Applications
22:17
Pro Django - Tutorial 4 - Docker
28:28
thenewboston
Рет қаралды 10 М.
Docker Tutorial for Beginners
50:38
mCoding
Рет қаралды 38 М.
Using docker in unusual ways
12:58
Dreams of Code
Рет қаралды 448 М.
Prepare a Django app for Deployment using Docker
39:10
London App Developer
Рет қаралды 89 М.
How to create a great dev environment with Docker
29:55
Patrick Loeber
Рет қаралды 265 М.
Docker | Towards serving React (Nginx) with Django API (gunicorn)
48:35
The Joker wanted to stand at the front, but unexpectedly was beaten up by Officer Rabbit
00:12