Word by word sentence by sentence it's crystal clear explanation even if we had paid and earned this type of explanation is not available with any tutorials best of luck piyush
Thanks Piyush. These sessions are indeed very helpful. I just wanted to add quick note for Windows users. In order to follow along for most of the commands that are shown and used in Mac OS command shell, they can download and 'Git Bash' and this shell can be opened in VS Code, Terminal tab. Thanks again!
Completed day02 challenge to day, It is very helpful, I enjoyed the video a lot and also I learned a lot, I will try to catch up with you guys as I can 🏃♂🏃♂🏃♂🏃♂🏃♂🏃♂🏃♂
Hey Piyush....Again you are with great content of docker. I appreciate your hard work and valuable time for teaching us. Hats off to you man..!! Please release daily basis video on this series I know it will difficult for you to manage but it will stay us to stick with you. See you in next video 👍 Your last question answer is ---> if we want to reduce our image size then we can use multi-stage Dockerfile.
Thank you for the feedback and yes, the answer is spot on. Regarding the daily video request: I have finished recording the entire series and am editing the last few videos. I plan to publish 3 to 4 weekly videos every Monday through Thursday at 6 AM EST/3:30 PM IST. I have chosen not to publish daily so that viewers following the series have time to understand the concepts, practice hands-on, document their learning, and not feel left behind. I hope you understand :)
To reduce the size of a large Docker container image, we can: Use Multi-Stage Builds: Separate the build and runtime environments. Choose Minimal Base Images: Use images like alpine or scratch. Optimize Layer Structure: Combine commands to reduce the number of layers. Remove Unnecessary Files: Clean up caches and temporary files. Use .dockerignore: Exclude unneeded files from the build context. Minimize Dependencies: Only install necessary dependencies. Strip Binaries: Remove debug symbols and unnecessary parts from binaries. Externalize Configuration: Use environment variables or volumes for configuration. Compress and Optimize Assets: Reduce the size of images, fonts, and other assets. These practices help keep your Docker image as lean as possible.
Thank you very much for the tutorials. Unfortunately, I have run into an installation problem with Docker. I receive this error when opening the installer. "We've detected that you have an incompatible version of Windows. Docker Desktop requires Windows 10 Pro/Enterprise/Home version 19044 or above. To continue with the installation, upgrade Windows to a supported version and then re-run the installer." Would you happen to know how to solve this? I have looked everywhere online and cannot find a solution.
Yeah if you are running older versions of Windows, you might run into compatibility issues. I would suggest to install a Linux VM using virtualbox or vagrant and use that.
Awesome and clear explanations. Built and published image using windows with docker desktop and wsl. Got a doubt, if "WORKDIR /app" is similar to cd app, so the next command -> "COPY . ." would it run inside the app dir right? Or please correct me if I am wrong. Thank you
WORKDIR would make the /app directory as the home directory of the container. COPY . . ( First dot is the current directory content and second dot is the workdir inside the container) Hope it helps
i just have one doubt writing and remembering all the binaries looks like a tough job because we cant remember all the binaries! so while writing dockerfiles should we memorize it or just search on the internet for the commands?
That's true we cannot memorize all the binaries and all the steps especially if you are not the developer of that project and most of the times this list is too large to remember. However, you would be aware of all these when you have worked on the development of the project. That is why I mentioned that creating the dockerfile is responsibility of a developer. We are basically writing all the steps that we have taken to build and application into a dockerfile to automate the build and packaging process. dockefile is a file that contains step by step instructions to compile an app, install dependencies, package it and make it ready to be shipped. I hope this answered your question.
Thank you for publishing the valuable course. It would be better if you make the main display screen (where u actually code) larger so that we can see the main content more clearly.
Nice Explanation,We can use distroless image to reduce and multi stage docker also. Another thing I want to add that can you use AWS terminal for the practice session, so that will be more user friendly.
Thanks for the feedback. Yes, you are right about using distroless and multi stage docker build. I could have used aws terminal or azure or gcp cloud shell but that is not the motive of this series. I tried to make it cloud vendor independent so that people who are working on a different cloud can also learn it. You can use a terminal locally or on a virtual machine or virtualbox , multipass etc.
webpack is used specifically for JS and it bundles the asset together, wont help you with the image size, next video will have the answer to this question.
Getting below error while building DockerImage ERROR: failed to solve: process "/bin/sh -c yarn install --production --ignore-engines" did not complete successfully: exit code: 1
I am sure sure what you have done, can you share the dockerfile and code repo in our discord server along with the steps you have performed including the commands?
I totally agree with you that docker hub is not industry standard however, the playlist was designed from a beginner's perspective so I had to start with dockerhub. In the end we will also be self hosting a container registry. The other thing to remember, docker enterprise offers a self hosting option with enterprise support, which is an industry standard.
Always tag your images with a clear, version-specific tag like `repo/image:v1`. This helps you track changes and makes it easy to roll back to previous versions if needed. Avoid using the `latest` tag because it can be unclear which version you are running, making it harder to debug issues and ensure consistency across different environments.
a dangling image just means that you've created the new build of the image, but it wasn't given a new name. So the old images you have becomes the "dangling image". Those old image are the ones that are untagged and displays "" on its name when you run docker images. When running docker system prune -a, it will remove all stopped containers, images and networks without a container associated, and build cache. Be Careful!
Hello, what could be the problem when after following all instructions, the localhost:3000 using browser is inaccessible.. Is it because i only use docker playlabs?
i cannot access through browser but i was able to check via CLI using curl -I localhost:3000 and has successful response of 200 OK so it means it is working
Are you using a linux machine because i am trying the same in windows and the commands are not working or does docker have a diffrent command prompt terminal
Struggled a bit with docker, docker desktop, and docker hub authentication on my linux box. Ended up uninstalling and reinstalling docker desktop. Now we're getting back to it.
Am using docker desktop on my windows machines and $ this doesnt work. I created directories withoutusing it and now the touch command is not working with error:$touch Dockerfile | ~~~~~~~~~~
touch is a linux command and wouldnt work on Windows. I'd suggest learning Linux first before directly jumping into Docker/Kubernetes. Get some hands on experience with Linux, and then you can either install Linux or WSL to practise it
Hi Piyush , i had one question . i wanted to know that is this only for certification purpose ? I'm fresher working in MNC as Devops engineer. is this useful for me ? to understand the containerization and Kubernetes
Hello Bhushan, This is not just for certification however, it covers certification as well. The series is someone who is a beginner to Kubernetes and covers the topics from beginner to intermediate level. I will be adding more videos to the playlist soon. Yes, it will be surely helpful for any DevOps/Cloud Engineer
To make it smaller, remove all those "noise" like the node_modules that are irrelevant to the image. To remove them, you can use the dockerignore. that is, create new new file called dockerignore and place those irrelevants files inside.
No docker compose is used to simplify the container management when there are multiple containers, it doesnt help reducing the size. Checkout the day3 video for the answer.
I did not focus much on the application code as I am not a developer and the course is not focused from development point of view. I am glad that you found the video interesting :)
That's a really good question. I should have explained this. Before pushing the image to any repo we need to add a few details to the image such as tag prefix and suffix. If you are using docker hub repository then you tag it with reponame/imagename:tag where tag could be the commitid, sha , build id or anything relevant. If you have multiple environments then you tag the images based on the environment for which you would like to use that image. The same image should go to all the environment but we tag them seperately for instance, the image is deployed in dev then we tag it as dev-tested and then it is ready to be deployed in uat, once it is tested in uat, you tag it as uat-tested and then it is ready to go to prod. And you can use seperate repositories for seperate environment but you are actually promoting the same image from one repo to another as per their release status. I hope this answered your question.
@@TechTutorialswithPiyush It’s great 😊 thank u Also one more thing, will it be sufficient for appearing to CLA exam, and anything else required to go through then please guide us that too 🙏😊
33:45
1. **Use a Lightweight Base Image**:
- Example: `FROM alpine:latest`
2. **Multi-Stage Builds**:
- Build in one stage, copy artifacts to a clean stage.
3. **Minimize Layers**:
- Combine commands into a single `RUN`.
- Example:
```Dockerfile
RUN apt-get update && apt-get install -y package1 package2 && apt-get clean && rm -rf /var/lib/apt/lists/*
```
4. **Remove Unnecessary Files**:
- Delete temporary files and caches.
5. **Use `.dockerignore` File**:
- Exclude unnecessary files.
- Example:
```
node_modules
*.log
```
6. **Optimize Dependencies**:
- Install only necessary dependencies.
7. **Use `COPY` instead of `ADD`**:
- `COPY` is more predictable.
Good job
Thank you very much for explaining docker in very easy way with each and every line in details
Word by word sentence by sentence it's crystal clear explanation even if we had paid and earned this type of explanation is not available with any tutorials best of luck piyush
It feels great to know that 😄 Thank you
FYI for all, 11:30
lts - long term support
latest - latest image
great series sir !
Thank you so much
You are that guy! Keep rolling! The interactions, likes, subscriptions, and more will follow in due time. You truly are gifted as a guide/teacher.
I appreciate that!
Im moving from IT 3rd line service desk to cloud engineering! This is super helpful ❤ Thank you!
Glad to know that my videos are being helpful ❤️ All the best for your transition into cloud, I wish it'll happen soon for you
Your explanations are clear, and the content is super valuable. For reduce the size, we will use multi-stage builds. waiting for next video.
Awesome, thank you for the correct answer! Yes, that's what we will be doing in the next video tomorrow.
Thanks Piyush. These sessions are indeed very helpful. I just wanted to add quick note for Windows users. In order to follow along for most of the commands that are shown and used in Mac OS command shell, they can download and 'Git Bash' and this shell can be opened in VS Code, Terminal tab. Thanks again!
Thank you for sharing! Yes, absolutely, GitBash, WSL, Vs code anything would work.
Thank you for your hard work; this series is absolutely fantastic!
You're very welcome!
Your explanations are relatable and easy to understand. The content is truly impressive.
Thank you so much! I am glad you found it helpful.
nice way of explaining. I really liked the step by step way to perform all the exercises. Enjoying the sessions!
Glad you enjoyed it!
Sir, You are doing a good service. Thanks Alot🙏🏼
You're most welcome
Awesome series!!!!
Thanks a lot for detailed explanation!!!!!
You're welcome
very cool tutorial and with neat explanation.
Thanks for the day 2 video sir it was helpfull. Cheers to new learnings
Awesome! Thanks for the feedback!
You're simply great bro !
Thank you 🙏
Following.. much appreciated you posting the content now !! In depth explanation.. !!
My pleasure!
Great stuff brother!
Re-watch series again, on my path to achieve CKA, greate course , Tahnk You Piyush. Hopefully in near future see other cert path related to K8S
Always welcome, and yes, many more coming soon
You are Amazing bro! Keep up the good work!
Thank you so much, bro! 🙏
Excellent take-off. keep up the good work for community.
Looking forward for docker multi stage builds.👏👏👏
@TechTutorialswithPiyush
Thank you for the feedback! Yes, let's move forward with the next video.
Well explained.. Enjoying while learning😊
Thanks for liking!
Excellent explanation and hand holding practice
Glad you found it helpful 🙂
Completed day02 challenge to day, It is very helpful, I enjoyed the video a lot and also I learned a lot, I will try to catch up with you guys as I can 🏃♂🏃♂🏃♂🏃♂🏃♂🏃♂🏃♂
I am glad that you found it helpful! Let's go with the next one!
Excellent content to start. Thank you Piyush
you're welcome
You are amazing Piyush!
Thank you my friend.
Awesome content. Waiting for the next !!! Great work
Thanks a ton, next video tomorrow.
Just wow .. what an explaination and rich content !! Thanks Piyush. Will share it in other platform to make it reach to wider community.
Thank you so much buddy! I truly appreciate it
Hey Piyush....Again you are with great content of docker. I appreciate your hard work and valuable time for teaching us. Hats off to you man..!! Please release daily basis video on this series I know it will difficult for you to manage but it will stay us to stick with you. See you in next video 👍 Your last question answer is ---> if we want to reduce our image size then we can use multi-stage Dockerfile.
Thank you for the feedback and yes, the answer is spot on.
Regarding the daily video request:
I have finished recording the entire series and am editing the last few videos. I plan to publish 3 to 4 weekly videos every Monday through Thursday at 6 AM EST/3:30 PM IST. I have chosen not to publish daily so that viewers following the series have time to understand the concepts, practice hands-on, document their learning, and not feel left behind.
I hope you understand :)
Smoothly delivered. Kudos
Great session .. Thank you
You're welcome
Awesome Piyush !! Great Details and Teaching...Really Excellent &Awesome
Thanks a ton
Thank you so much! Awesome content
Thanks
Day -2 completed, for me, it was hard to understand and remember commands but I successfully created my first docker image and container.
To reduce the size of a large Docker container image, we can:
Use Multi-Stage Builds: Separate the build and runtime environments.
Choose Minimal Base Images: Use images like alpine or scratch.
Optimize Layer Structure: Combine commands to reduce the number of layers.
Remove Unnecessary Files: Clean up caches and temporary files.
Use .dockerignore: Exclude unneeded files from the build context.
Minimize Dependencies: Only install necessary dependencies.
Strip Binaries: Remove debug symbols and unnecessary parts from binaries.
Externalize Configuration: Use environment variables or volumes for configuration.
Compress and Optimize Assets: Reduce the size of images, fonts, and other assets.
These practices help keep your Docker image as lean as possible.
That's absolutely correct!
Very Educative. Thank You Sir
You are welcome, glad it was helpful!
Clear and crisp !✅
Thank you so much
lovely video, thanks
Awesome Thank you sir , now I can say I am really learning the docker
Let's go 🚀💪
Thank you very much for the tutorials. Unfortunately, I have run into an installation problem with Docker. I receive this error when opening the installer.
"We've detected that you have an incompatible version of Windows.
Docker Desktop requires Windows 10 Pro/Enterprise/Home version 19044 or above.
To continue with the installation, upgrade Windows to a supported version and then re-run the installer."
Would you happen to know how to solve this? I have looked everywhere online and cannot find a solution.
Yeah if you are running older versions of Windows, you might run into compatibility issues. I would suggest to install a Linux VM using virtualbox or vagrant and use that.
Thank you a lot sir.❤❤❤
Welcome
Clear to understand, Thank you.
You're welcome!
Nicely explained
Thank you so much 🙂
Great thanks for the clear explanations
You're welcome buddy!
Very informative!Thanks you!
You're welcome
today I completed day02 and It's so amazing.
Hi Piyush, I can't download docker hub on my laptop as it is work laptop, what are the other options? should I download on any Linux machine on ec2?
I guess you meant Docker desktop, Yes you can try on ec2
Thank you for this Video!
My pleasure!
Awesome and clear explanations. Built and published image using windows with docker desktop and wsl. Got a doubt, if "WORKDIR /app" is similar to cd app, so the next command -> "COPY . ." would it run inside the app dir right? Or please correct me if I am wrong. Thank you
WORKDIR would make the /app directory as the home directory of the container.
COPY . . ( First dot is the current directory content and second dot is the workdir inside the container) Hope it helps
@@TechTutorialswithPiyush Helpful!
it is great session.. you are awesome
Glad you enjoyed it 😄
i just have one doubt
writing and remembering all the binaries looks like a tough job because we cant remember all the binaries! so while writing dockerfiles should we memorize it or just search on the internet for the commands?
That's true we cannot memorize all the binaries and all the steps especially if you are not the developer of that project and most of the times this list is too large to remember. However, you would be aware of all these when you have worked on the development of the project. That is why I mentioned that creating the dockerfile is responsibility of a developer. We are basically writing all the steps that we have taken to build and application into a dockerfile to automate the build and packaging process. dockefile is a file that contains step by step instructions to compile an app, install dependencies, package it and make it ready to be shipped. I hope this answered your question.
@@TechTutorialswithPiyush yes sir! I got it. Thanks a ton! ❤️
Exciteddd!!! Can't Wait..
Thanks a lot 😊
great, this is the first time i did a docker exercise
Don't stop now 🚀
Good, and clear explaination, Thanks for the vedio. To explore it in details could you suggest me any books for containerize application.
If you want to go deep into it, follow the official documentation after this
how to get to this terminal , i tried command prompt , git cmd , wsl cli ,,, i dont see the terminal icon on docker window
That is present only on mac. You can use gitbash if you are on windows or install a Linux Virtual machine such as Ubuntu
Thank you for publishing the valuable course. It would be better if you make the main display screen (where u actually code) larger so that we can see the main content more clearly.
Thank you for the feedback. Point noted.
Nice Explanation,We can use distroless image to reduce and multi stage docker also. Another thing I want to add that can you use AWS terminal for the practice session, so that will be more user friendly.
Thanks for the feedback. Yes, you are right about using distroless and multi stage docker build.
I could have used aws terminal or azure or gcp cloud shell but that is not the motive of this series. I tried to make it cloud vendor independent so that people who are working on a different cloud can also learn it. You can use a terminal locally or on a virtual machine or virtualbox , multipass etc.
@@TechTutorialswithPiyush can you add UPI payment method for channel membership payment
Should webpack be used to reduce the size of app ?
webpack is used specifically for JS and it bundles the asset together, wont help you with the image size, next video will have the answer to this question.
Day 02 Amazing 🐫
Thank you so much
very informative, thanks.
Thank you
Getting below error while building DockerImage
ERROR: failed to solve: process "/bin/sh -c yarn install --production --ignore-engines" did not complete successfully: exit code: 1
I am sure sure what you have done, can you share the dockerfile and code repo in our discord server along with the steps you have performed including the commands?
Docker hub is not using in industry due to security issue , Pls puts some light where industry acceptance mechanism is being used .
I totally agree with you that docker hub is not industry standard however, the playlist was designed from a beginner's perspective so I had to start with dockerhub. In the end we will also be self hosting a container registry. The other thing to remember, docker enterprise offers a self hosting option with enterprise support, which is an industry standard.
which terminal to use in case of Docker installed in windows?
You can use wsl on windows or try gitbash but I would recommend installing an Ubuntu virtual machine.
@@TechTutorialswithPiyush I will try this
Hello and thanks for the video, we can use multi-staging for reducing the volume of an image!
Hello Sina, that is absolutely correct. Thank you
Thak you Bro 🥰
You're welcome! Happy to help. 🚀
Always tag your images with a clear, version-specific tag like `repo/image:v1`. This helps you track changes and makes it easy to roll back to previous versions if needed. Avoid using the `latest` tag because it can be unclear which version you are running, making it harder to debug issues and ensure consistency across different environments.
Great job!
sir I am using docker desktop there is a container dangling stage please explain it
a dangling image just means that you've created the new build of the image, but it wasn't given a new name. So the old images you have becomes the "dangling image". Those old image are the ones that are untagged and displays "" on its name when you run docker images.
When running docker system prune -a, it will remove all stopped containers, images and networks without a container associated, and build cache. Be Careful!
Done and shared the task
Amazing, well done buddy
Clearly explained.
Thanks
WEll Explained 🙌🙌
thank you sir ❤❤
Most welcome
I have one doubt, how can we connect to the windows terminal and execute docker related commands.
Install gitbash
Amazing 🔥
Glad you like it! Thank you
Hi sir when to use bash and sh to exec into the container??
It depends on the container image, most of the Linux based images have sh and some have bash, you can use according to that
Hello, what could be the problem when after following all instructions, the localhost:3000 using browser is inaccessible.. Is it because i only use docker playlabs?
i cannot access through browser but i was able to check via CLI using curl -I localhost:3000 and has successful response of 200 OK so it means it is working
you need to expose the container on port 80
-p 3000:80
If you are using docker labs, you need to expose the port from there
Thanks piyush 👍
Welcome 😊
Are you using a linux machine because i am trying the same in windows and the commands are not working or does docker have a diffrent command prompt terminal
I'm using a Mac terminal but you can use a Linux machine or WSL on Windows. I'd recommend Linux
in the section of the Dockerfile:
COPY . . same as COPY . /app
That is correct
Struggled a bit with docker, docker desktop, and docker hub authentication on my linux box. Ended up uninstalling and reinstalling docker desktop. Now we're getting back to it.
Awesome, we use things, we break it and then we fix it, That's how we learn 👍💪
We can use multi-stage Dockerfile to reduce the size of the docker image.
That's absolutely correct
best video sir
Thank you so much Rohit!
Hello can someone let me know were we need run this command ? are you running this command in Linux ?
I'm using a macbook which comes with an inbuilt terminal. If you are on windows, you can install gitbash or I'd recommend doing it on Ubuntu machine
Am using docker desktop on my windows machines and $ this doesnt work. I created directories withoutusing it and now the touch command is not working with error:$touch Dockerfile
| ~~~~~~~~~~
touch is a linux command and wouldnt work on Windows. I'd suggest learning Linux first before directly jumping into Docker/Kubernetes. Get some hands on experience with Linux, and then you can either install Linux or WSL to practise it
Sir if possible please keep the working windows size bigger than other window, always need to zoom while learning..
Content is gr8
Will do, thank you
Informative
Thank you!
Hi Piyush , i had one question . i wanted to know that is this only for certification purpose ?
I'm fresher working in MNC as Devops engineer. is this useful for me ? to understand the containerization and Kubernetes
Hello Bhushan, This is not just for certification however, it covers certification as well. The series is someone who is a beginner to Kubernetes and covers the topics from beginner to intermediate level. I will be adding more videos to the playlist soon. Yes, it will be surely helpful for any DevOps/Cloud Engineer
To make it smaller, remove all those "noise" like the node_modules that are irrelevant to the image. To remove them, you can use the dockerignore. that is, create new new file called dockerignore and place those irrelevants files inside.
Dockerignore is one way of excluding the irrelevant files, and docker multi-stage build helps a lot to reduce the image size.
we can use docker-compose for reduce the size
mast video majja aagaya reeally👍
No docker compose is used to simplify the container management when there are multiple containers, it doesnt help reducing the size. Checkout the day3 video for the answer.
Thanks bro
@@TechTutorialswithPiyushokay thanks for simply explanation
awesome :)))))
Man I don't even know js very well
But im learning docker because the videos is so enthusiastic that it makes me concentrate with all eyes and ears
I did not focus much on the application code as I am not a developer and the course is not focused from development point of view. I am glad that you found the video interesting :)
Lets go Piyush I am excited!! first comment here
Thank you so much 😊🙏
Day 2 .. are u using the CMD prompt ?
I am using Mac terminal but if you are on windows, you can use gitbash
TIME STAMP 22:10 after getting build , how the docker desktop (images) showing local repo , didn't even yet logged in to docker right
No I was already logged in
Thank you
You're welcome!
I think for reducing the sizing of image we can use multi statge build which means using multiple FROM
Spot on! Next video is about multistage builds.
For reducing image size, we can go with Docker multistage build.
Correct ✅
it provides me a lot of celerity in Docker
Amazing! Thanks for letting me know.
Super
nice sir
Thanks
Hello Sir, why do we use Docker tag ?
That's a really good question. I should have explained this.
Before pushing the image to any repo we need to add a few details to the image such as tag prefix and suffix. If you are using docker hub repository then you tag it with reponame/imagename:tag where tag could be the commitid, sha , build id or anything relevant. If you have multiple environments then you tag the images based on the environment for which you would like to use that image. The same image should go to all the environment but we tag them seperately for instance, the image is deployed in dev then we tag it as dev-tested and then it is ready to be deployed in uat, once it is tested in uat, you tag it as uat-tested and then it is ready to go to prod. And you can use seperate repositories for seperate environment but you are actually promoting the same image from one repo to another as per their release status.
I hope this answered your question.
@@TechTutorialswithPiyush It’s great 😊 thank u
Also one more thing, will it be sufficient for appearing to CLA exam, and anything else required to go through then please guide us that too 🙏😊