Skip to content

Push github stored docker container image to Google Container Repository #26030

Answered by BrightRan
dschinkel asked this question in Actions
Discussion options

You must be logged in to vote

@dschinkel ,

You can try with the following steps:

  1. Login to GitHub Packages (docker login), and pull (docker pull) the image from your GitHub repository.

    docker login docker.pkg.github.com -u USERNAME -p PASSWORD
    docker pull docker.pkg.github.com/OWNER/REPOSITORY/IMAGE_NAME:TAG
    
  2. Get the IMAGE_ID via the “docker images” command, and set new image name and tag (docker tag) with your Google Cloud Container Registry URL for the image.

    image_id=$(docker images docker.pkg.github.com/OWNER/REPOSITORY/IMAGE_NAME:TAG | awk 'NR == 2 {print $3}')
    docker tag $image_id gcr.io/PROJECT-ID/IMAGE_NAME:TAG
    
  3. Login to the Google Cloud Container Registry (if need), and push (docker push) the image to yo…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Product Feedback
2 participants