Docker Compose vs Dockerfile - Dockerfile Explained - Docker Tutorial

preview_player
Показать описание
This video is a docker tutorial which explains the two main components of Docker - Docker Compose & Dockerfile (docker compose vs dockerfile).

This video is part of a series and this series helps you to learn docker from scratch. This series is a docker tutorial for beginners.

What is a Docker File?
Docker can build images automatically by reading the instructions from a Dockerfile. A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.
In the video we are showing a dockerfile example from which you can learn how to create dockerfile / how to write dockerfile. Dockerfile step by step procedure to create Docker Images from it.

Commonly Used Dockerfile Commands (Dockerfile Instructions):
1. FROM
2. RUN
3. CMD
4. ENTRYPOINT
5. WORKDIR
6. COPY
7. ADD
8. EXPOSE
9. LABEL
10. VOLUME
11. USER
12. ENV
13. ARG
14. ONBUILD

What is docker compose and what is docker compose used for?
Docker Compose is a tool to help define and share multi-container applications (introduction to docker compose).
It’s an important tool for any application that needs multiple microservices, as it allows each service to easily be in a separately managed container.

How to use Docker Compose?
We can use a YAML file to configure your application’s services.
You don’t need to place this at the root of your project like a Dockerfile. In fact, it can go anywhere, as it doesn’t depend on any other code. However, if you’re building the images locally, it will need to go in a project folder with the code being built.

In the video you can see how to use docker compose yml file and how to run docker compose file.

Video Chapters:
0:00 - Dockerfile Basics
0:57 - Dockerfile Explained
3:33 - Dockerfile Commands
6:08 - Dockerfile Build Container
10:20 - Introduction to Docker Compose
11:19 - Docker Compose UP

#CodingDroplets #Docker
Рекомендации по теме
Комментарии
Автор

Thank you. The Docker-Compose explanation was spot on.

AmolGautam
Автор

Your explanation was so clear and understandable.
Thanks for the tutorial,
Excellent !

zeusmortegh
Автор

A perfect video for a beginner trying to learn the basics. Thanks a lot.

abhishekbajracharya
Автор

I was randomly scrolling couple of videos to get a refresher before my interview and I would say this is one of the best and easiest explanation of Docker. Thanks for saving my time.

argl
Автор

A Small Token of Appreciation.. 💯 Very nice.. and Excellent Coverage with Good Presentaion and explanation in less time. 👋

mkannanmsc
Автор

💯 Very nice.. and Excellent Coverage with Good Presentaion and explanation in less time. 👋

mkannanmsc
Автор

the background and the overall explorer theme on 08:30 is of great esthetics, good move!

victorgromov
Автор

My Raspberry Pi Lite OS runs on a 64GB Micro SD card boot drive and I have a secondary 2TB SSD to store data in. I plan to install Jellyfin and PhotoPrism and NextCloud which requires installing Maria MySQL Data Base. What has me confused is how I specify all docker data storage for PhotoPrism, JellyFin and Nextcloud to take place on the 2TB SSD drive and not the 64GB Micro SD card boot drive? Do you have a video that shows correct docker Volume syntax that enables data to get stored onto a 2TB SSD secondary data drive?

theitzone
Автор

How can one determine what should be included in the docker compose file? For example if I want to make a Django website, how do I know what services to include in the file and what keywords to use?

andrewstribling
Автор

If someone don't use user name and password in sql server means use window authentication then what should i write in environment in docker compose ??

ankurchaprana
Автор

Thank you so much for the video, it was very helpful! I was wondering what screen recorder you use because it looks so crisp.

digitzero
Автор

I wanted to do a connection between mongodb container and hadoop container ... can u help me plz !?

boutheynabiba
Автор

Thanks for this 💯!

When I ran the command : docker-compose up
I got this error : The system cannot find the file specified:
[21308] Failed to execute script docker-compose

Any help ?

mista_ia
Автор

Nice! Would have been even better if you showed how to re-deploy updates or clean stuff up when you no longer need them. Still very informative. Thanx!!!

MRAMetharam
Автор

Hello, it is a great tutorial butwhen running command :"docker build -t sample-img ." I got stuck on the following issue :
PS docker build -t sample-img .
[+] Building 0.2s (2/2) FINISHED docker:default
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 2B 0.0s
ERROR: failed to solve: failed to read dockerfile: open no such file or directory

jacekpierzchaa