|
4 | 4 |
|
5 | 5 | --- |
6 | 6 |
|
7 | | -### 1. 🛠 Prerequisites |
8 | | -- **Install Docker**: Ensure Docker is installed and running on your system. |
9 | | -- **Docker Hub Account**: Create an account on [Docker Hub](https://hub.docker.com/) if you don’t already have one. |
| 7 | +### 1. Prerequisites |
| 8 | +- *Install Docker*: Ensure Docker is installed and running on your system. |
| 9 | +- *Docker Hub Account*: Create an account on [Docker Hub](https://app.docker.com/signup?_gl=1*p202hw*_ga*ODYyMDc4MjA4LjE3MzQ5NzE1NzQ.*_ga_XJWPQMJYHQ*MTczNDk3MTU3My4xLjEuMTczNDk3MTY5NC41OC4wLjA.) if you don’t already have one. |
10 | 10 |
|
11 | 11 | --- |
12 | 12 |
|
13 | | -### 2. 🔑 Log in to Docker Hub |
| 13 | +### 2. Log in to Docker Hub |
14 | 14 | Open your terminal and run: |
15 | 15 |
|
16 | 16 | ```bash |
17 | 17 | docker login |
18 | 18 | ``` |
19 | | -- Enter your Docker Hub **username** and **password** correctly when prompted. |
| 19 | + |
| 20 | +- Enter your Docker Hub *username* and *password* correctly when prompted. |
20 | 21 |
|
21 | | -### 3. Choose which image you want to push to Docker Hub using the command `docker images`. |
| 22 | +### 3. List Your Docker Images |
| 23 | +Choose which image you want to push to Docker Hub by listing the available images by the command docker images. |
22 | 24 |
|
23 | | -### 4. Suppose we take an example where there is an image, and we need to push it to Docker Hub named `helpops`. |
| 25 | +<br> |
24 | 26 |
|
25 | | -### 5. After successfully logging into Docker Hub, we now need to assign a tag to docker image using the command below. |
| 27 | +### 4. Let’s take an example where we want to push an image named helpops to Docker Hub. |
| 28 | + |
| 29 | +<br> |
| 30 | + |
| 31 | +### 5. After successfully logging into Docker Hub, assign a tag to the Docker image using the following command: |
26 | 32 |
|
27 | 33 | ```bash |
28 | 34 | docker tag helpops azfaralam440/helpops:01 |
29 | 35 | ``` |
30 | 36 |
|
31 | | - - --> Here, "azfaralam440" is my own Docker Hub username, so on your side, you need to use your own Docker Hub username and specify your Docker image name and tag. |
| 37 | +- azfaralam440 is the *Docker Hub username*. |
| 38 | +- helpops is the *image name*. |
| 39 | +- 01 is the *tag* (you can choose any tag like v1.0, latest, etc.). |
| 40 | + |
| 41 | +> Replace azfaralam440 with your Docker Hub username and specify your own image name and tag. |
| 42 | +
|
| 43 | +<br> |
32 | 44 |
|
33 | | -### 6. ⬆ Now, the final step is to push your image to Docker Hub. |
| 45 | +### 6. Now, push your tagged image to Docker Hub using the following command: |
34 | 46 |
|
35 | 47 | ```bash |
36 | 48 | docker push azfaralam440/helpops:01 |
37 | 49 | ``` |
| 50 | + |
| 51 | + |
| 52 | +### 7. After the push is complete: |
| 53 | + |
| 54 | + a) Log in to [Docker Hub](https://login.docker.com/u/login/identifier?state=hKFo2SBuSll1U3VENDRoVFhZZURLSmozY1BzdHFPV3NraVhHa6Fur3VuaXZlcnNhbC1sb2dpbqN0aWTZIFpaeWJMT2RQYl9BMTRpQTR3UU5iS0dybmE1RzVvSEZHo2NpZNkgbHZlOUdHbDhKdFNVcm5lUTFFVnVDMGxiakhkaTluYjk). |
| 55 | + b) Navigate to your Repositories. |
| 56 | + c) Verify that your image appears there. |
| 57 | + |
| 58 | + <br> |
| 59 | + |
38 | 60 |
|
39 | | -- **Congratulations, you have successfully pushed your image to Docker Hub.** |
| 61 | +- 🎉**Congratulations! You have successfully pushed your Docker image to Docker Hub.** |
0 commit comments