Setting up the DockerHub repository
First, create a repository on DockerHub by following these steps:
- Log in to DockerHub, then click on Repositories at the top.
- Under Repositories, click the Create repository button:
![Image Alt Text:img1](/learning-paths/laptops-and-desktops/self_hosted_cicd_github/Figures/01.png)
- In the Create repository window, set the repository name to sampleapp and change the repository visibility to Private.
![Image Alt Text:img2](/learning-paths/laptops-and-desktops/self_hosted_cicd_github/Figures/02.png)
- Click the Create button. This will create the repository and redirect you back to the repositories list. Note the Docker push command. It should look like: docker push <YOUR_ACCOUNT_NAME>/sampleapp:tagname
![Image Alt Text:img3](/learning-paths/laptops-and-desktops/self_hosted_cicd_github/Figures/03.png)
Now you will need to generate the access token to enable the workflow to authenticate to DockerHub. To create the access token:
- Click on your username in the top-right corner of the Docker Hub site.
- From the dropdown menu, select My Account, and then click the Security tab on the left:
![Image Alt Text:img4](/learning-paths/laptops-and-desktops/self_hosted_cicd_github/Figures/04.png)
- Click the New Access Token button. This opens the New Access Token window, in which:
- Type ci-cd for the token name.
- Select Read, Write, Delete permissions and then click the Generate button.
- A Copy Access Token window appears. Ensure you copy and safely store the generated access token.