Тёмный

Docker Crash Course #5 - The Dockerfile 

Net Ninja
Подписаться 1,5 млн
Просмотров 106 тыс.
50% 1

Hey gang, in this Docker tutorial we'll talk about the Dockerfile and how we use it to create docker images.
🐱‍💻 Access the course files on GitHub:
github.com/iamshaunjp/docker-...
🐱‍💻 Node.js Course:
On Net Ninja Pro - netninja.dev/p/node-js-crash-...
On RU-vid - • Node JS Tutorial for B...
🐱‍💻 Modern JavaScript Course:
On Net Ninja Pro - netninja.dev/p/modern-javascr...
On Udemy - www.thenetninja.co.uk/udemy/m...
On RU-vid - • Modern JavaScript Tuto...
🐱‍💻 React Course:
On Net Ninja Pro - netninja.dev/p/build-websites...
On Udemy - www.thenetninja.co.uk/udemy/r...
🐱‍💻 VS Code - code.visualstudio.com/
🐱‍💻 Docker Hub - hub.docker.com/
🐱‍💻 Docker docs - docs.docker.com/

Опубликовано:

 

7 фев 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 81   
@SamuelGuebo
@SamuelGuebo Год назад
I love your Docker series. Your teaching style is clear, straight to the point, and very methodical. Thanks for the time and efforts you've put into this. Really appreciate it!
@CoentraDZ
@CoentraDZ 2 года назад
This is the most clear explanation I ever seen at RU-vid for Docker. All other videos I watched before in other channels they just explain like they are robots.
@francksgenlecroyant
@francksgenlecroyant 2 года назад
The greatest explanation about Dockerfile. I was typing things in this file just for the sake of typing because i saw it working in a tutorial, but from now on, i know what each and every single layer mean. Thanks Shaun!
@johnshaff
@johnshaff Год назад
You have your dependencies installed after the source code in your example docker file. Docker caches layers, and by installing dependencies before copying the source code, you can leverage this cache mechanism. If the dependencies don't change often, Docker can reuse the cached layer with the installed dependencies, which speeds up the build process. By installing dependencies after copying the source code, the cache will be invalidated whenever your source code changes, even if the dependencies remain the same. This leads to longer build times.
@grad_student
@grad_student 2 дня назад
2 years later still so useful.
@TheFayt11
@TheFayt11 2 года назад
thank you so much for this mr shaun ! you really helped me with my work. i really cannot understand docker for a long time but you explain it so simple and clean ! Thank you, keep it up mr Shaun !
@infinite_sorrow
@infinite_sorrow 4 месяца назад
finally someone that takes the time to actually explain the syntax while they go along.......the structure of the language is critical in order to learn, yet so few actually tell you what you are doing, they just tell you enter this blah de blah enter that yada yada. Thanks man i was going crazy trying to find something that gave me a clue lol
@donalslemon4947
@donalslemon4947 3 месяца назад
This was exactly what I needed, thank you and well done. Clearly explained, with specific elucidation of the command usage and meanings. I'll be checking out the rest of the videos in this series as I still have questions around the 'AS base' and 'AS build' modifiers as well as how 'ENTRYPOINT' works.
@mykelcee
@mykelcee Год назад
I've watched multiple tutorial about Docker only you could explain this clearly. keep going (y)
@NetNinja
@NetNinja Год назад
Thanks Michael, that means a lot :)
@tech-networking9287
@tech-networking9287 2 года назад
Thank you! This is the best explanation by far I've seen, I'm confused for couple days.
@Bruno87198
@Bruno87198 Год назад
I'm so grateful for people like you in the RU-vid! I just needed to review the Docker's main concepts and this series is helping a lot! Thank you!
@NetNinja
@NetNinja Год назад
Glad I could help!
@jejunegamingtv1359
@jejunegamingtv1359 2 года назад
This is the cleanest, most understandable video of dockerfile
@darpananeja6755
@darpananeja6755 2 года назад
Didnt realise the upload date of the video untli I reached the end!! Eagerly waiting for further parts!!!!
@hooman_talakian
@hooman_talakian Год назад
I have seen many long and boring Docker tutorials, but this one! Amazing. you made my day. thank you a lot ...❤❤
@NetNinja
@NetNinja Год назад
Glad it was helpful! Thanks for watching Hooman :)
@saifmahin7425
@saifmahin7425 7 месяцев назад
Excellent. Thanks a lot for sharing the playlist!
@adaoko
@adaoko Год назад
Very clearly explained. Thank you so much!
@mikloscsepella2743
@mikloscsepella2743 2 года назад
so clear. you are so special in that you are able to make every subject simply understandable.
@pourfondeurs
@pourfondeurs 17 дней назад
Perfect tutorials for getting started with Docker
@NetNinja
@NetNinja 17 дней назад
Thanks!!
@asaflevy9387
@asaflevy9387 2 года назад
Excellent explanation! Thank you so much.
@stefanocons
@stefanocons Год назад
Amazing course as always! Thank you so much!
@NetNinja
@NetNinja Год назад
Thanks for watching Stefano!
@yossisternlicht21
@yossisternlicht21 2 года назад
Great tutorial as usual. One point, what will happen if we change package.json to reference a new dependency, will the previous version get installed from the cache? This could be a big issue.
@jeremyamon24
@jeremyamon24 2 года назад
I just bought this as my first course on your website because not only that I want to access the rest of the course now, but I feel that should since I've been freelancing for the past year now thanks to your videos. Thank you!
@user-fv3vf5wo9p
@user-fv3vf5wo9p 2 года назад
Hello When you bought the course, did you pay it one time or it monthly fees?
@jeremyamon24
@jeremyamon24 2 года назад
​@@user-fv3vf5wo9p I paid one time for the docker course only, though there is also a monthly/yearly plan if you want
@user-fv3vf5wo9p
@user-fv3vf5wo9p 2 года назад
@@jeremyamon24 ok thank you so much
@vijaytembugade
@vijaytembugade 2 года назад
I am just willing to all course now!! I cant stop myself. 😀
@abdelkaderkaouane1944
@abdelkaderkaouane1944 2 года назад
You are amazing, thank you very much for sharing this good things
@nuamaaniqbal6373
@nuamaaniqbal6373 5 месяцев назад
I was waiting for someone like you to make a course on Docker! Here we are ! Next is Kubernetes ! When are you going to do the honor?
@rey6253
@rey6253 2 года назад
Very well explained
@wenjingwang8735
@wenjingwang8735 Год назад
Thanks so much for your video. It's so helpful for me. Your explanation is easy to understand.
@NetNinja
@NetNinja Год назад
That's great to hear :) glad it's helpful
@ZACK-lf4gr
@ZACK-lf4gr Год назад
Thank you for your time and generosity
@NetNinja
@NetNinja Год назад
Thanks for watching Zack :)
@manfredschneider3230
@manfredschneider3230 Месяц назад
thanks for the free presentation. BUT .. often recomended - and only where it is possible: I would appreciate a much larger, more noticeable, maybe colored pointer/cursor, moved with a calm hand to allow me following more easily your brilliant thoughts.
@manueljordan317
@manueljordan317 Год назад
An excellent tutorial - well explained Mr Ninja - a cold beer to you ...
@NetNinja
@NetNinja Год назад
Thanks Manuel!
@colonelvector
@colonelvector Год назад
Excellent tutorial, just excellent
@NetNinja
@NetNinja Год назад
Appreciate it :) thanks for watching!
@praveenpallaganijp236
@praveenpallaganijp236 2 года назад
I am so much thankful to this channel, thank you ninja 🙂
@michakwiatek5031
@michakwiatek5031 Год назад
I think the order of commands should be different to speed up rebuilding image. I would first copy packages.json into /app, then run npm instal, and finally copy the rest of the app files. Thanks to that approach, after modifying something in app files, reinstall of npm packages won't be necessary. Small caveat: It requires to set up volume to be able to develop our app locally without need for rebuilding.
@michalnalevanko6608
@michalnalevanko6608 2 года назад
May I ask? Shouldnt we use the first parameter of command COPY with 2 dots to specify root directory where all the files are stored? As our working directory is /app already.
@CarlosVixil
@CarlosVixil 10 месяцев назад
I wish this video played anytime anyone ever mentioned docker. then it wouldn't be so mysterious and overwhelming.
@MuhsinAslan
@MuhsinAslan 2 года назад
Hey ninja, you all right? your breath is a little sick. Thank you for docker playlist :)
@springmemory6637
@springmemory6637 10 месяцев назад
WORKDIR - specifies where the commands should run RUN commands are run at image build time. This means commands that we want to actually be executed on runtime should be added in CMD
@VFXTutorials
@VFXTutorials 10 месяцев назад
Great tutorial!
@NetNinja
@NetNinja 10 месяцев назад
Thanks!
@DependerKumarSoni
@DependerKumarSoni 10 месяцев назад
You said, every line after "WORKDIR: /app" would run in /app directory. Then while executing the COPY statement, would not it take source as /app. Which means, copy all from /app to /app?
@keifer7813
@keifer7813 7 месяцев назад
9:00 Does WORKDIR create an "app" folder if it doesnt already exist? Since you said image file structure is completely different to a project's file strcuture
@bluesteel1
@bluesteel1 8 месяцев назад
Please create a k8s series as well i love you style of teaching
@JozsefShapasy
@JozsefShapasy 11 месяцев назад
well done
@maamounmribah4564
@maamounmribah4564 Год назад
amazing
@stephenodogwu7359
@stephenodogwu7359 Год назад
Nice one as always.A little confusion though where are your node_modules from express js installation
@apolomoraes1767
@apolomoraes1767 11 месяцев назад
he deleted it on purpose to run node_modules with docker
@digitallizzygaming2099
@digitallizzygaming2099 11 месяцев назад
With the port number is this standard for docker or can it be assigned any number?
@mohamedyoussef8835
@mohamedyoussef8835 Год назад
Awesome tutorials ++++++++++++++++++++++++++++ Thank you.
@reynold99991
@reynold99991 2 года назад
does the github link always default to the main repository with readme file in the youtube videodescription or is it possible to change it to the other repositories like lesson 5 which contain the files shown in video
@202prince1
@202prince1 Год назад
You need to change the branch to access respective lesson files. Like change the branch from main to lesson-5 for lesson 5 files.
@stevesun1530
@stevesun1530 2 года назад
didnt see api file on the links, can you show me where is it?
@MrKaspi097
@MrKaspi097 2 года назад
What if I need to install global package from that node version at specific version and use it in cmd? Eg I need cordova@10 (11 is latest) and use 'cordova build' command? What if I change sth in code? Do I need tk build it again? I'm guessing yes, asking to be sure.
@alexanderpoplawski577
@alexanderpoplawski577 2 года назад
Just add a RUN npm install -g cordova@10 to the Dockerfile. After that you can add RUN cordova build. Yes, if you change something in the Dockerfile or the content, that goes into the image you have to build again. There is an alternative with volumes, but I think Shawn will address this in the following parts.
@anghai9858
@anghai9858 7 месяцев назад
thank you so much
@NetNinja
@NetNinja 7 месяцев назад
You're welcome!
@arthurn8952
@arthurn8952 7 месяцев назад
Where do i open the lesson 5 at? Help, i'm a Dummy
@TariqSajid
@TariqSajid 2 года назад
what about file permission in docker ? how to create user inside docker for logs permissions
@alexanderpoplawski577
@alexanderpoplawski577 2 года назад
All commands during image build and in the container are executed as root. Since the base image is a linux system, you can run commands to add a user and switch to that user in subsequent commands in the Dockerfile. I am pretty sure all this will be explained in more detail during the course. Be patient!
@SilviuIT-tn3dn
@SilviuIT-tn3dn 6 месяцев назад
👌👌👌👌
@sulaymanmuhammedjawneh5937
@sulaymanmuhammedjawneh5937 2 года назад
How i am loving and appreciating this can't be containerized
@barcactu1032
@barcactu1032 Месяц назад
I did not understand how can you COPY . . And get the /api content into /app
@akaharrison1644
@akaharrison1644 Месяц назад
In my own understanding is that, he create a dockerfile in same directory with dependencies and app.js, that's why he runs the command COPY . . which the first "." represent the relative directory that all of them are located then the second "." is telling the command to save everything in the "WORKDIR /app" created
@linearGaming001
@linearGaming001 2 года назад
Where's the source file? I can't find it without paying.
@ms77grz
@ms77grz 7 месяцев назад
👍👍
@Bismuth-ig5ru
@Bismuth-ig5ru 2 месяца назад
I thought Docker is chaotic.
@thewetfly9207
@thewetfly9207 Год назад
I waited for app directory in the tree... but it has been stored in the other dimension xd
@soldadopreciso
@soldadopreciso 2 года назад
Please the simple node project isn't in github.
@koribr764
@koribr764 9 месяцев назад
Isn't it a bit too fast for beginners?!
@MyLordHitsHard
@MyLordHitsHard Год назад
takes so much time on RUN npm install after 397 seconds it fails
Далее
Docker Crash Course #6 - dockerignore
3:59
Просмотров 66 тыс.
Docker Crash Course #10 - Volumes
18:38
Просмотров 62 тыс.
ОВР Шоу: Русская баня @TNT_television
12:06
Пробую торты
00:43
Просмотров 352 тыс.
Virtual Machine (VM) vs Docker
8:52
Просмотров 176 тыс.