# Built Image Page

*<mark style="color:orange;">**Building a Docker image is a fundamental step in containerized application deployment.**</mark>*&#x20;

*<mark style="color:orange;">**Here's an expanded explanation of the process:**</mark>*

***Building a Docker Image: Step by Step***

1. *<mark style="color:blue;">**Dockerhub Account Setup:**</mark>* Before you start building a <mark style="color:orange;">Docker image</mark>, you need to ensure that you have a <mark style="color:orange;">Dockerhub account</mark>. If you don't have one, you can sign up for free on the <mark style="color:orange;">Dockerhub</mark> website. Once you have an account, you need to link it to your application management platform. This is typically done in the *<mark style="color:orange;">**"My Account"**</mark>* or a similar section of the platform.

<figure><img src="https://459768738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtKO1h8ymGqNtYiKTJ8WZ%2Fuploads%2FfTcOlIdIOp30Cf2o3z24%2FScreenshot%202023-10-04%20120521.png?alt=media&#x26;token=7bc6ad72-d449-4a72-9fe2-7c3da5520698" alt="" width="375"><figcaption></figcaption></figure>

1. <mark style="color:yellow;">**Adding Dockerfile and GitHub Repository:**</mark> To create a *<mark style="color:orange;">Docker image</mark>*, you must have a *<mark style="color:orange;">**Dockerfile**</mark>*. A *<mark style="color:orange;">**Dockerfile is**</mark>* a script that contains instructions for building the image. It defines what base image to use, what files to include, and what commands to run. Make sure your project includes a Dockerfile, and it's available in a GitHub repository. You will need a valid GitHub URL to proceed.
2. &#x20;<mark style="color:purple;">**Linking Dockerhub**</mark>**&#x20;to&#x20;**<mark style="color:orange;">**MY Account**</mark> Once your Dockerhub account is set, navigate to the <mark style="color:orange;">"My Account"</mark>  page on our platform. Here, you'll find the option to link your Dockerhub account. This step is essential to seamlessly integrate Dockerhub into our platform.
3. <mark style="color:purple;">**Accessing the Build Image Page:**</mark> Once your Dockerhub account is set up, and you have your Dockerfile and GitHub URL ready, access the "Build Image" page on your application management platform. This page is where you initiate the image-building process.

<figure><img src="https://459768738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtKO1h8ymGqNtYiKTJ8WZ%2Fuploads%2FBeIH7k1X8FIPfpdkxgCj%2Fdocker%20(2).png?alt=media&#x26;token=c2a5ef09-97f1-4156-9aef-4f29ffeb5532" alt="" width="356"><figcaption></figcaption></figure>

1. <mark style="color:orange;">**Providing Image Details:**</mark> On the "Build Image" page, you'll be prompted to provide details about the image you want to create. This includes specifying the GitHub repository URL where the Dockerfile is located.

<figure><img src="https://459768738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtKO1h8ymGqNtYiKTJ8WZ%2Fuploads%2FahDdr7xLxqugzdFuOird%2Fbuild-image.png?alt=media&#x26;token=b67601e6-a104-47c1-a5be-827d7296bda4" alt="" width="353"><figcaption></figcaption></figure>

1. <mark style="color:orange;">**Building the Image:**</mark> After providing the necessary details, click the *<mark style="color:orange;">**"Build"**</mark>* or a similar button to start the image-building process. The platform will use the Dockerfile and GitHub repository you specified to create the Docker image.
2. <mark style="color:orange;">**Monitor the Build:**</mark> During the image-building process, you can monitor the progress through log messages. These logs will show the various steps being executed, such as downloading dependencies and running commands defined in the Dockerfile.

<figure><img src="https://459768738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtKO1h8ymGqNtYiKTJ8WZ%2Fuploads%2FTGjTPkJNpsM8mgfrQ2gf%2Fbuild_success.png?alt=media&#x26;token=ed14f95d-8ef6-4824-99a8-ee24a84543a6" alt="" width="278"><figcaption></figcaption></figure>

1. <mark style="color:orange;">**Successful Image Push:**</mark> If the image build is successful, you will receive a confirmation message like *<mark style="color:orange;">**"Docker image successfully pushed to the Docker account."**</mark>* This indicates that the image has been built and pushed to your Dockerhub account, making it available for deployment.
2. <mark style="color:orange;">**Accessing the Built Image:**</mark> To access the built image, you can go to the <mark style="color:purple;">"Create App"</mark> or a similar section of your application management platform. There, you can search for the image using your Dockerhub username and the image name.
3. To locate your newly minted Docker image, simply head to the *<mark style="color:blue;">**"Create App"**</mark>* section and search for it using the format: `dockerhub-username/image-name`.

<figure><img src="https://459768738-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtKO1h8ymGqNtYiKTJ8WZ%2Fuploads%2FUfg5tWNcRpQrkExfw8A0%2Fjrr.png?alt=media&#x26;token=48d99790-521c-461c-a00d-9980bf3ed0a1" alt="" width="375"><figcaption></figcaption></figure>

*In summary, building a Docker image involves linking your Dockerhub account, providing details about the image, and using a Dockerfile from a GitHub repository to create the image. This image can then be used for deploying your containerized application. It's a crucial step in containerization, as it ensures that your application and its dependencies are packaged into a portable container for easy deployment and scalability.*

<details>

<summary>Category</summary>

Kubernetes, cloud computing, DevOps, cloud services, hosting platform, container orchestration, cloud infrastructure, cloud deployment, cloud management, cloud technology, cloud solutions, built image

</details>
