Friday, August 08, 2025

Push containe to GHCR


Command for push to GHCR

1. Log in to GHCR

Use Docker CLI to authenticate to GitHub Container Registry:


echo YOUR_GITHUB_PERSONAL_ACCESS_TOKEN | docker login ghcr.io -u YOUR_GITHUB_USERNAME --password-stdin

 

Make sure your PAT (Personal Access Token) has the write:packages and read:packages scopes.


2. Tag your Docker image

Assuming your image is named my-app:latest, tag it for GHCR:


docker tag my-app:latest ghcr.io/YOUR_GITHUB_USERNAME/my-app:latest


Replace YOUR_GITHUB_USERNAME with your actual GitHub username (or org name).

You can also add versions/tags as needed.


3. Push the image

Push the tagged image to GHCR:


docker push ghcr.io/YOUR_GITHUB_USERNAME/my-app:latest


4. Verify on GitHub

Go to your GitHub profile or organization, then:

  • Navigate to Packages.

  • You should see your pushed Docker image there.

Wednesday, January 15, 2025

Docker error : The network name cannot be found.

 If u get this error

deploying WSL2 distributions ensuring main distro is deployed: checking if main distro is up to date: checking main distro bootstrap version: getting main distro bootstrap version: open \\wsl$\docker-desktop\etc\wsl_bootstrap_version: The network name cannot be found. checking if isocache exists: CreateFile \\wsl$\docker-desktop-data\isocache\: The network name cannot be found.

 

Try the following to troubleshoot:

  1. Stop Docker Desktop
  2. Run the following command in your terminal wsl --unregister docker-desktop
  3. Run Docker Desktop again (Will recreate the distro)

Note: I also start my Docker Desktop as Administrator each time, so you probably need to run your terminal/Powershell as Administrator like I did.