Docker Full Course - 2023

Hi There is the new Full FREE Course on Docker 2023. Will keep update on week basis:

Course Scope: This course covers the following topics:

  1. Understanding Docker: Gain a clear understanding of Docker and its purpose in modern application development and deployment.
  2. Docker Basics: Learn the fundamental Docker commands and how to use them effectively.
  3. Pulling and Running Images: Discover how to use the Docker command-line interface (CLI) and the Docker Desktop app to pull and run images from Docker registries.
  4. Creating and Running Containers: Master the process of creating and running containers using both the Docker CLI and the Docker Desktop app.

Course Outcomes: Upon completing this course, you will achieve the following outcomes:
  1. Gain a solid understanding of Docker and its core concepts.
  2. Learn how to effectively pull and run Docker images from Docker registries using the Docker CLI or Docker Desktop app.
  3. Acquire the skills to run containers using the Docker CLI or Docker Desktop app, enabling you to deploy and manage applications in containers.
  4. Gain the ability to create your own Docker images and publish them to Docker Hub, a popular registry for sharing Docker images.
  5. Learn how to run containers using the Docker CLI or Docker Desktop app, utilizing your own custom Docker images that you have created.

By the end of this course, you will have a comprehensive understanding of Docker, be proficient in pulling and running Docker images, have the capability to create and publish your own Docker images, and be able to run containers using both pre-existing and custom images.

Lets start the course:

What is Docker:

Docker is an open-source platform that allows you to automate the deployment, scaling, and management of applications using containerization. Containers are lightweight and portable environments that package software and its dependencies, allowing applications to run consistently across different computing environments. Docker provides tools and a runtime to create, deploy, and run containers efficiently, making it easier to develop, ship, and run applications in various computing environments.
Here are some key basics about Docker:
  1. Containers: Containers are lightweight and isolated environments that encapsulate an application and its dependencies, making it portable and consistent across different systems.
  2. Docker Engine: Docker Engine is the runtime that executes and manages containers. It runs on the host operating system and provides an API and command-line interface (CLI) for interacting with containers.
  3. Docker Images: Docker images are the building blocks of containers. An image is a read-only template that contains everything needed to run an application, including the code, runtime, libraries, and dependencies.
  4. Dockerfile: A Dockerfile is a text file that specifies the steps to build a Docker image. It defines the base image, adds necessary dependencies, configures the environment, and sets up the containerized application.
  5. Docker Registry: Docker Registry is a service that stores and distributes Docker images. The default public registry is Docker Hub, but you can also set up private registries for internal use.
  6. Docker Compose: Docker Compose is a tool that allows you to define and manage multi-container applications. It uses a YAML file to define the services, their configurations, and how they interact with each other.
  7. Docker CLI: Docker provides a command-line interface (CLI) that allows you to interact with Docker Engine and perform various operations, such as building images, running containers, managing networks, and more.
  8. Orchestration: Docker can be used in conjunction with orchestration platforms like Kubernetes to manage and scale containerized applications across multiple hosts or nodes.
These basics should give you a good understanding of Docker's core concepts and how it facilitates the containerization of applications.

Here are some commonly used Docker commands that are useful for managing containers and images:

docker run: Create and run a container from a Docker image.
Example: docker run <image_name>

docker pull: Pull an image from a Docker registry.
Example: docker pull <image_name>

docker stop: Stop a running container.
Example: docker stop <container_id>

docker start: Start a stopped container.
Example: docker start <container_id>

docker restart: Restart a running container.
Example: docker restart <container_id>

docker ps: List running containers.
Example: docker ps

          *where "ps" stands for Process Status of the container. 

docker ps -a: List all containers, including stopped ones.
Example: docker ps -a

docker images: List all available Docker images.
Example: docker images

docker rm: Remove a stopped container.
Example: docker rm <container_id>

docker rmi: Remove an image.
Example: docker rmi <image_name>

docker exec: Run a command inside a running container.
Example: docker exec <container_id> <command>

docker logs: View the logs of a container.
Example: docker logs <container_id>

docker inspect: Get detailed information about a container or image.
Example: docker inspect <container_id_or_image_name>

docker build: Build a Docker image from a Dockerfile.
Example: docker build -t <image_name> <path_to_dockerfile>

docker-compose up: Create and start containers defined in a Docker Compose file.
Example: docker-compose up

These commands cover some of the basic functionalities of Docker. For more detailed information and additional commands, you can refer to the Docker documentation.


Lets do some hands-on the Docker using CLI:

First Install Docker Desktop app on your machine, and make sure it up and running , you can check from the left bottom corner.



It should be in Green Color 




Then go to CLI / Terminal 

docker --version

O/p: Docker version 23.0.5, build bc4487a


Check if any Images are exist in the Machine by 

docker images

REPOSITORY    TAG       IMAGE ID       CREATED        SIZE

ankur-first   1         2bdc4b3f7b83   14 hours ago   182MB


Like you can see there is one image already there exists.

same we can check from Desktop app as well :





Similarly check for any Container info

docker ps

CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES





So  there is no container is present & running at this time so its Empty.



Comments

Popular posts from this blog

The self healing automation framework - Healenium Updated Dec2023

Heleanium - Web without using Docker