No video

Docker Crash Course #10 - Volumes

  Рет қаралды 67,918

Net Ninja

Net Ninja

2 жыл бұрын

Hey gang, in this docker tutorial you'll lern how to use volumes to enable a "live preview" experience whilst developing.
🐱‍💻 Access the course files on GitHub:
github.com/iamshaunjp/docker-...
🐱‍💻 Node.js Course:
On Net Ninja Pro - netninja.dev/p/node-js-crash-...
On KZfaq - • 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 KZfaq - • 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/

Пікірлер: 69
@ikhlasoyelami8383
@ikhlasoyelami8383 Жыл бұрын
It is what it is. I thought docker is one complex course after watching a 5 hours video. It was nice till I ran into Net Ninja, your tutorials are just spectacular
@NetNinja
@NetNinja Жыл бұрын
Great to hear Ikhlas!
@juicio_den
@juicio_den Жыл бұрын
He’s blessed. He’s the best
@HelloWorld-tn1tl
@HelloWorld-tn1tl 4 ай бұрын
This teaching style is great, it shows every detail you need to know, make you really understand it.
@NetNinja
@NetNinja 4 ай бұрын
Thank you :) that means a lot
@touseefghazanfar8487
@touseefghazanfar8487 2 жыл бұрын
Thank you for putting so much effort in your videos to make them as much clear as possible
@vikmaks6430
@vikmaks6430 2 жыл бұрын
I was searching for docker volumes today. Thanks Shaun!
@PrakashBesra
@PrakashBesra 11 ай бұрын
The second -v flag (-v /app/node_modules) mounts a volume (Docker internal volume) at the /app/node_modules directory inside the container. This is done to avoid overwriting the node_modules directory with the local version. Mounting a volume here means that the local node_modules directory will not be used, and the image's built-in node_modules will be preserved.
@isidorenwaiwu2793
@isidorenwaiwu2793 6 ай бұрын
So this has been bordering me for a while. What do you do when you want to install packages or uninstall packages as you develop you application. If the node_modules on you host is not in sync with the one in the container?
@seyolas3588
@seyolas3588 5 ай бұрын
@@isidorenwaiwu2793 create a new image i suppose
@navturn
@navturn 2 жыл бұрын
Thank you. Very clear and interesting even if this last video gave me a bit headache :D
@alexandersamokhin
@alexandersamokhin 2 жыл бұрын
When running a command to use volumes I'm getting an error docker: Error response from daemon: mkdir C:UserssamokDesktopdocker-ninjaapi: Access is denied. UPD: This is because the \ character has a special meaning in Git Bash. If you are using Git Bash, you must neutralize it using \\:
@akhrorbekabdukhamitov8872
@akhrorbekabdukhamitov8872 2 жыл бұрын
this comment is underrated!
@alcymn
@alcymn Жыл бұрын
for anyone getting the same error, if you're using gitbash as default vscode terminal then just use /$(pwd) instead of copy the path as shown in the video.
@jeremiahakpera3457
@jeremiahakpera3457 Жыл бұрын
@@alcymn Thank you very much for this. I was about to give up on it
@catalinacimpanu188
@catalinacimpanu188 Жыл бұрын
​@@alcymn Thank you so much! I just opened a normal powershell terminal in VS code and it worked flawlessly! 😇 And I was also almost about to give up 🤪 It actually didn't work for me in the bash terminal in vs code, (on windows) got the following error: "docker: Error response from daemon: mkdir C:\Program Files\Git\;C: Access is denied." (gave permission to all users in windows, still didn't work)
@AmodeusR
@AmodeusR 3 ай бұрын
Third tutorial I watch and I simply couldn't solve the fact the container was simply not mapping to the host, just because of a freaking /... Thanks Alexander for your comment, you saved me a lot of stress, more than I already accumulated haha
@kurisuta1305
@kurisuta1305 Жыл бұрын
amazing!!! i heart docker now .. thanks for explaining very easily and well!!! kudos
@NetNinja
@NetNinja Жыл бұрын
Glad it helped! thanks Kuri :)
@hemangshrimali6308
@hemangshrimali6308 2 жыл бұрын
Really nice way of explaining by example.
@LoveisHell85
@LoveisHell85 2 жыл бұрын
Please include docker in your future full stack videos. Thank you
@m.e10150
@m.e10150 Жыл бұрын
Thank you very much
@dawitz362
@dawitz362 Ай бұрын
Brilliant playlist.
@davidk7212
@davidk7212 4 ай бұрын
Are there any pros/cons of implementing the "nodemon app.js" command as a script in the package.json file versus specifying it directly in the CMD instruction of the Dockerfile, or is it more a matter of style or preference?
@novacoax
@novacoax Жыл бұрын
Everything works, Hallelujah 😂😂 Never heard that one before.
@JeffBarron1
@JeffBarron1 2 жыл бұрын
Hi Shaun... can you please do a full dockerfide web application wih mySQL build and maybe a host file server volume config files? :) love your channel
@xiaotingshao3689
@xiaotingshao3689 Жыл бұрын
I got error when I use -v, showed syntax error. I put the path after -v in double quotes, then fix the error. Hopefully can help some of you. And we can delete node_modules from our app as well. Docker use the modules inside image
@theouterspace5285
@theouterspace5285 Жыл бұрын
thanks. it works like charm ^^
@thtnawbezuwork6080
@thtnawbezuwork6080 9 ай бұрын
dude you just solved problem that I been stuck for hours on thanks 🤗
@huzaifajaliawala1904
@huzaifajaliawala1904 2 жыл бұрын
Does dockerignore file is ignore when we are using volumes? For example if we have placed a folder in dockerignore file but it has been mapped using volumes. Does the folder will be mapped or since it is in dockerignore it will be ignore because it was not copied to the during the image build?
@huzaifajaliawala1904
@huzaifajaliawala1904 2 жыл бұрын
If everything is mirrored to the container using volumes so does it meant that dockerignore which avoids some folders to be copied to the image so that folders are now also the inside the container?
@Keitaro51
@Keitaro51 2 ай бұрын
With volume and all our local files mapped with container /app directory, is "COPY . ." layer still necessary ? Thanks in advance
@deybmen
@deybmen 2 жыл бұрын
What's the difference of using Docker vs. using an all around version manager like asdf, for development?
@vishalthapa3101
@vishalthapa3101 9 ай бұрын
Got error !! error Couldn't find a package.json file in "/app"
@thtnawbezuwork6080
@thtnawbezuwork6080 9 ай бұрын
same here can any body help
@NeerajKumar17
@NeerajKumar17 2 жыл бұрын
Hi Ninja, it was awesome tutorial, small request , can you please do tutorial on deploying it to aws?
@sibusisomfana9834
@sibusisomfana9834 Жыл бұрын
And one on deploying to Azure
@aramharutyunyan6589
@aramharutyunyan6589 Жыл бұрын
when you write the sevond volume "-v /app/node_modules" and explained that this creates some folder in our host and maps to it for next runs(16:25). BUT you also use "--rm" which deletes the container after stop, so how can it run the second time as well if after stop its deleted? and what happened with the folder in our host after stop?
@stullesblog6692
@stullesblog6692 2 жыл бұрын
I have one problem with the -v using the absolute path. that does not work on my mac. for some reason, it puts a "/host_mnt" in front of my absolute path. Do you have an idea?
@MccZerk
@MccZerk 5 ай бұрын
I am confused, this just seems to be uploading what is inside the api folder locally to the container folder, what does this have to do with peristent storage?
@aidenyang747
@aidenyang747 Жыл бұрын
what if I add new node_modules, would the code break?
@ArunKumar-wh1pe
@ArunKumar-wh1pe Жыл бұрын
When running a command to use volumes I'm getting an error docker: Error response from daemon: invalid mode: /app.
@surajoberai
@surajoberai Жыл бұрын
I run into an error : "Unable to find image :locally' because there were whitespace in my absolute path after -v tag. So to remove this error, make sure there is no space in folder name in your absolute path. It will fix the problem. hope it helps and the tutorial is awesome!!!
@felixlindh
@felixlindh 10 ай бұрын
Thank you!
@farzadkhan3813
@farzadkhan3813 8 ай бұрын
Thanks brother! Helped me
@Bruno87198
@Bruno87198 Жыл бұрын
I tried removing the "node_modules" folder in the directory, and not creating a volume for it. But, when the container is created and started, the app crashes... showing the error "Error: Cannot find module 'express''"... Is it still necessary use "-v /app/node_modules" even when we do not have the node_modules folder in our host directory? Why?
@tiagomamouros8725
@tiagomamouros8725 Жыл бұрын
I had the same problem,. I dont understand why I need to have the second volume when it doesnt exist on the host
@yubrajkhatri3519
@yubrajkhatri3519 3 ай бұрын
The part when he said everything is working fine hallielulliwya was comedy
@phemiewilliams
@phemiewilliams Жыл бұрын
Everything runs Halleluyah! lol! Nice tutorial
@NetNinja
@NetNinja Жыл бұрын
Awesome :) thanks for watching!
@ms77grz
@ms77grz 9 ай бұрын
👍👍
@AdamDawoodjee3
@AdamDawoodjee3 6 ай бұрын
Please do a course on traefik
@thewetfly9207
@thewetfly9207 Жыл бұрын
CMD looks funny, array of three strings xd
@Djinn667
@Djinn667 9 ай бұрын
For anyone dealing with the error message: "Error response from daemon: error while creating mount source path ... mkdir file exists", just restart docker desktop and it should go away : )
@muhammadtarique242
@muhammadtarique242 2 жыл бұрын
Nodemon has an issue, when a crash will happen then nodemon will still continue and not stop. This is why i believe nodemon shouldn't be used here in docker
@leg875
@leg875 Жыл бұрын
10:41 😂
@D_Ladybug
@D_Ladybug Жыл бұрын
Waw
@fredpourlesintimes
@fredpourlesintimes 2 жыл бұрын
Your content, in this video, is pretty confusing; pretty painfull. My opinion about this serie is that it's lower quality than usual.
@Kevin-ou1zg
@Kevin-ou1zg Жыл бұрын
have you seen a better docker course somewhere? I've checked the laracasts one, this one is better
@ethanendures
@ethanendures Жыл бұрын
this is a good docker course
@anasouardini
@anasouardini 6 ай бұрын
This video is 4 minutes about volumes and 12 minutes about everything else from nodemon to images and containers LOL. Thanks for wasting my time.
@seyolas3588
@seyolas3588 5 ай бұрын
x)
@anasouardini
@anasouardini 6 ай бұрын
Bro, you keep repeating yourself a thousand times throughout the video.
Docker Crash Course #11 - Docker Compose
11:22
Net Ninja
Рет қаралды 60 М.
Is this my Fault?
15:41
Linus Tech Tips
Рет қаралды 2 МЛН
Smart Sigma Kid #funny #sigma #memes
00:26
CRAZY GREAPA
Рет қаралды 8 МЛН
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 51 МЛН
لقد سرقت حلوى القطن بشكل خفي لأصنع مصاصة🤫😎
00:33
Cool Tool SHORTS Arabic
Рет қаралды 29 МЛН
Stop, Intel’s Already Dead!
13:47
Linus Tech Tips
Рет қаралды 271 М.
How to OVER Engineer a Website // What is a Tech Stack?
11:20
Fireship
Рет қаралды 2,4 МЛН
Docker Crash Course for Absolute Beginners [NEW]
1:07:39
TechWorld with Nana
Рет қаралды 1,6 МЛН
If you're not developing with this, you're wasting your time
14:30
Articulated Robotics
Рет қаралды 276 М.
Do NOT Learn Kubernetes Without Knowing These Concepts...
13:01
Travis Media
Рет қаралды 261 М.
Don't use local Docker Volumes
12:43
Christian Lempa
Рет қаралды 171 М.
Linux Servers. Docker #5. Volume и монтирование в контейнер
28:48
Smart Sigma Kid #funny #sigma #memes
00:26
CRAZY GREAPA
Рет қаралды 8 МЛН