Skip to content

Commit abd2756

Browse files
authored
[ADD] Docker image push guide for better readability
1 parent 906c76b commit abd2756

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

Push image to docker hub/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# How to Push Docker Images to Docker Hub 🐳
2+
3+
**Follow these steps to push your Docker images to Docker Hub:**
4+
5+
---
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.
10+
11+
---
12+
13+
### 2. 🔑 Log in to Docker Hub
14+
Open your terminal and run:
15+
16+
```bash
17+
docker login
18+
```
19+
- Enter your Docker Hub **username** and **password** correctly when prompted.
20+
21+
### 3. Choose which image you want to push to Docker Hub using the command `docker images`.
22+
23+
### 4. Suppose we take an example where there is an image, and we need to push it to Docker Hub named `helpops`.
24+
25+
### 5. After successfully logging into Docker Hub, we now need to assign a tag to docker image using the command below.
26+
27+
```bash
28+
docker tag helpops azfaralam440/helpops:01
29+
```
30+
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.
32+
33+
### 6. ⬆ Now, the final step is to push your image to Docker Hub.
34+
35+
```bash
36+
docker push azfaralam440/helpops:01
37+
```
38+
39+
- **Congratulations, you have successfully pushed your image to Docker Hub.**

0 commit comments

Comments
 (0)