• Tutorials
  • DSA
  • Data Science
  • Web Tech
  • Courses
August 29, 2022 |2.3K Views

How to Create a Custom Docker Image

  Share   Like
Description
Discussion

In this video, we'll see the Concepts of Dockerfile & keywords like RUN, COPY, ADD, FROM, CMD, WORKDIR, EXPOSE, ENV and other. 
We'll also learn how to build bespoke Docker images for ourselves and upload them to the docker hub profile. 

It is a good idea to push your images to your docker hub profile so that you can pull them in your system and the cloud, where all of your work is kept, without having to generate it from scratch. 

The pull command comes first. 
This command will download/pull the complete operating system within seconds depending upon your internet connectivity. 

The run command will be used to execute the downloaded image. With this command, my image will be launched, giving us access to an interactive shell or terminal. 

The commit command is the third and most crucial command for building our own image. By using this command, we can easily extract the packages we need from the existing image and make our own custom image. 

Tag command is the fourth command. This command requires us to rename our image.

You can make a ton more helpful docker images to address specific business use cases, such as using a docker image to launch a WordPress blogging site or making your own MySQL database image. You must comprehend and use this fundamental idea in accordance with your needs. You can still access your git account within Docker Containers even if your project is running on Docker. Simply installing Git within your Docker container is all that is required. The same topic will be covered in this article.

Reference Article: https://www.geeksforgeeks.org/how-to-create-your-own-docker-customised-image/