Перейти к содержимому

Docker Compose vs Dockerfile - Dockerfile Explained - Docker Tutorial

Coding Droplets

0:00 / 0:00

Docker Compose vs Dockerfile - Dockerfile Explained - Docker Tutorial

47 686 просмотров · 4 года назад
Coding Droplets
27,1 тыс. подписчиков
47 686 просмотров · 4 года назад
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. The configuration for a docker compose file is done in docker-compose.yml. 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