##### 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 #####
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.
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
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.
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!
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.
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.
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.
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.
@@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
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
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'.
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
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?
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. 👍
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
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
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 . . ?
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.
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.
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 ! :)
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?
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.
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?
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 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?
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. 👍
@@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.
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
#####
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
#####
HAHAHAHAHA SO FUNNY !!!! HE CHANGED THE NAME OF THE FILE OMFG 😂😂😂😂😂😂😂😂😂😂😂😂
@@olivierchabaut6515 a kto to przyszedł? pan maruda niszczyciel dobrej zabawy pogromca uśmiechów dzieci
thanks for all
And this took me an hour to figure out :(
vs code doesn't allowed to save file as double dot..i was wondering at first haha
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.
Couldn't find a simpler explanation absolutely great stuff , Thank you
2 days i asked you about docker, and you posted a video about it today.
Thank you very much ❤️
Sorry you waited so long! 😜👍
@@veryacademy sir , sir we are faceing many issue in pytest ....is there any blog or someyhing to help ? plz plz i badly need it
@@saikatmukherjee8095 Sorry I don't have a blog or anything
@@veryacademy okk sir...but your videos ...are very helpful
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
honestly, this is the best content I could find on youtube about the topic, Thanks!!!
I don't get it why you have just 159 likes, guys make it 10K immediately!!
This is outstanding- appreciate you explaining in a simple way
This series is gold!! Thank you so much. I’ve been looking for an awesome Docker course. Now I have one.
Great to hear!
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.
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!
Awesome, thank you!
hooked on your tutorials....nice and easy pace..thanks
Glad you like them!
thank you so much for this useful tutorials.
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.
We need more this kind of video, Please consider making a video on docker-compose. Thank You.
Noted
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!
the best video on docker and django !!!
EXTREMELY USEFUL.. THIS REAALLY GOT ME TO UNDERSTAND.. THANKSSS
Thank you Very much. This tutorial saved a lot of my time. Kudos to you for such a neat and simple explanation!!
Thank you for a great video explanation!
Thank you for all the great tutorials👏👏👏
You are so welcome!
This is an amazing tut!! Thank you
Your explanation is very good, thank you!
Thank you
thank you as always!! amazing explanation
👍
Great Video, Thanks for your effort
My pleasure!
So thanks you
Well Explained Mate Thanks You!
OMG yes so simple and sweet thank you!
Thank you sir. This tutorial work to my application 👍👍
Very good, thank you!
Glad you liked it!
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.
You're very welcome! Thank you!
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.
What an amazing course!! Thank you very much! You are excellent teacher!
What a clear tutorial I really loved it. Thank you so much
Great job man, thank you very much!
Awesome as always 👍😀
Thanks again!
easy to follow. brilliant explanation.
Awesome tutorial!
Oh this is GREAT !
👍
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.
really helpful! thank you
Glad it was helpful!
Very thank Zander, good content.
pretty explaination dear ... :)
Awesome, thanks! Well explained.
Thank you Zander!! Badass name btw
😀 thanks
golden! thank you!
Dude thank you !!!!!
No problem!
Great tutorial, I really appreciate your explanation. 👍👍
Glad it was helpful! 👍
Excellent .
Thanks bro, God bless
Thank you too
Very clear explanation, thanks alot 😊
Awesome
you are very generous !
👍
that's great ... thanks a lot.
You are welcome!
Excelent!!😀
Thank you very much.
Welcome 😊
Thanks a lot
Most welcome
Amazing!!!
Can you add a follow up video showing how to serve static/media files ?
That would be awesome!
as always, you've explained it all so well.
I'll be trying this on a raspberry pi 🙏
Long time no see - hope you are well. Let me know how you get on! Presume you have a newer version with enough RAM 👍
@@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
@Zander Thanks for this tutorial. Please what's the difference between virtual environment and docker? thanks.
Here is a good resource - if not get back to me
www.simplilearn.com/tutorials/docker-tutorial/docker-vs-virtual-machine
@@veryacademy The article was informative now I clearly understand the difference. Thanks.
thank you!
You're welcome!
Super
python: can't open file '/a/manage.py': [Errno 2] No such file or directory
thank you man
so good, ty a lot
thank you sir
Most welcome
Thanks a lot!
how can i configure jenkins job for cicd. it would be really helpful if you can make video for same. thanks in advanse
[lease can you make video on how we deploy django with docker
I can't wait to finish all the courses in your channel but i dont get enough time! ugh.
I know how you feel! I want to get them finished!
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
I will do them all 👍
Thanks 👍👍 ...
Waiting for the database integration with django and docker
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'.
@@veryacademy thanks a lot
@@veryacademy How about a part four: "deploying django in a docker container"? :)
How does one use docker to deploy Django to a service like Linode, Heroku, Etc?
Huge thanks
👍
Is there a way to run Vm without hyper-v? i got this situation where my pc cant have hyper-v
Finally, some blue 🚬..
Thanks Sir
Enjoy!
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
copy past on dockerfile ?
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?
I will show you the way in part 3 😎 sure you can 👍
@@veryacademy Cool! Looking forward!
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 ?
Thnaka
Question: Is it absolutely necessary to create venv and instat django? Is it not possible to install djangk in docker and create files locally?
Yeah docker works
if i run your docker file on a server, how do I make it accessible by others ? do I need something like nginx ?
Make a series on Flask just like you made one for Django
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. 👍
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
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
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 . . ?
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.
thnx u
Hello,
Can you share .env.sample :)
Sorry, I don't have it.
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.
/bin/sh: 1: [python, : not found....? And yes i used double quotes instead of single in CMD.....any help?
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 ! :)
I thought that runserver was really built for development and is not wise to use in production
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?
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.
Is this something I could follow on linux?
Noted. I did aim to also perform the same tasks on linux.
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?
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." ?
Python3 manage.py migrate (type this in terminal)
@@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?
Is there any reason why you are renewing this tutorial? I have already watched the old one.
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. 👍
@@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.
i didnt understand docker ignore file
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