Skip to content

Commit

Permalink
Merge pull request #1465 from mdazfar2/legacy
Browse files Browse the repository at this point in the history
[Update] Image push to Docker Hub for readable
  • Loading branch information
mdazfar2 authored Dec 26, 2024
2 parents 51c8ac8 + 7e0c223 commit 6422093
Showing 1 changed file with 33 additions and 11 deletions.
44 changes: 33 additions & 11 deletions Push image to docker hub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,58 @@

---

### 1. 🛠 Prerequisites
- **Install Docker**: Ensure Docker is installed and running on your system.
- **Docker Hub Account**: Create an account on [Docker Hub](https://hub.docker.com/) if you don’t already have one.
### 1. Prerequisites
- *Install Docker*: Ensure Docker is installed and running on your system.
- *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.

---

### 2. 🔑 Log in to Docker Hub
### 2. Log in to Docker Hub
Open your terminal and run:

```bash
docker login
```
- Enter your Docker Hub **username** and **password** correctly when prompted.

- Enter your Docker Hub *username* and *password* correctly when prompted.

### 3. Choose which image you want to push to Docker Hub using the command `docker images`.
### 3. List Your Docker Images
Choose which image you want to push to Docker Hub by listing the available images by the command docker images.

### 4. Suppose we take an example where there is an image, and we need to push it to Docker Hub named `helpops`.
<br>

### 5. After successfully logging into Docker Hub, we now need to assign a tag to docker image using the command below.
### 4. Let’s take an example where we want to push an image named helpops to Docker Hub.

<br>

### 5. After successfully logging into Docker Hub, assign a tag to the Docker image using the following command:

```bash
docker tag helpops azfaralam440/helpops:01
```

- --> 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.
- azfaralam440 is the *Docker Hub username*.
- helpops is the *image name*.
- 01 is the *tag* (you can choose any tag like v1.0, latest, etc.).

> Replace azfaralam440 with your Docker Hub username and specify your own image name and tag.
<br>

### 6. Now, the final step is to push your image to Docker Hub.
### 6. Now, push your tagged image to Docker Hub using the following command:

```bash
docker push azfaralam440/helpops:01
```


### 7. After the push is complete:

a) Log in to [Docker Hub](https://login.docker.com/u/login/identifier?state=hKFo2SBuSll1U3VENDRoVFhZZURLSmozY1BzdHFPV3NraVhHa6Fur3VuaXZlcnNhbC1sb2dpbqN0aWTZIFpaeWJMT2RQYl9BMTRpQTR3UU5iS0dybmE1RzVvSEZHo2NpZNkgbHZlOUdHbDhKdFNVcm5lUTFFVnVDMGxiakhkaTluYjk).
b) Navigate to your Repositories.
c) Verify that your image appears there.

<br>


- **Congratulations, you have successfully pushed your image to Docker Hub.**
- 🎉**Congratulations! You have successfully pushed your Docker image to Docker Hub.**

0 comments on commit 6422093

Please sign in to comment.