0

I have Github Package Registry about Docker Image. I want to deploy it to Azure Web Apps. I try the setup like this,

  1. Server URL: https://docker.pkg.github.com
  2. Full Image Name & Tag: berviantoleo/my-telegram-bot/my-telegram-bot:latest

I'm not fill the username & password, because it is public docker image. I also already try to bring username & password, but no luck, still failed to pull.

I see from the logs, it have logs like this:

2020-11-16T02:46:04.868Z INFO  - Pulling image from Docker hub: berviantoleo/my-telegram-bot/my-telegram-bot:latest

It's very weird because I already change the Server URL, is it the Server URL only support Docker Hub? I need help about this. I already try from Dockerhub, yeah, it can be deployed. But for now, I want to try from Github Packages Registry.

Update:

  • I've made mistake, the fullname should be: docker.pkg.github.com/berviantoleo/my-telegram-bot/my-telegram-bot:latest need include the docker.pkg.github.com

  • When change to private repository and provide username and password, it can pulled the image.

  • When public repository, it still need username and password, maybe because I misunderstand about the package. I think docker.pkg.github.com still need to be authenticated. I get this log:

     2020-11-18T03:33:57.973Z ERROR - DockerApiException: Docker API responded with status code=InternalServerError, response={"message":"Get https://docker.pkg.github.com/v2/berviantoleo/tele-bot/tele-bot/manifests/latest: no basic auth credentials"}
    
  • I still need to find solution that no need username and password.

  • Any updates on this question? Does it solve your problem? – Charles Xu Nov 17 '20 at 01:39
  • For set it to private registry and provide username and password, it can be pulled correctly. I think I misunderstand about github package. The public repo still need username and password so web app can pull the image, I think `docker.pkg.github.com` need authenticated account to pull the image no matter public or private. Also I made mistake about the fullname. I've changed to correct fullname, in the azure webapp can pull the image. I can say the problem not come from azure web app, it's my mistake. The log from azure web app confusing actually. – Bervianto Leo Pratama Nov 18 '20 at 03:50
  • If the answer is helpful and solves your problem, please accept it. – Charles Xu Nov 18 '20 at 06:20
  • If you have any more questions on this issue, please let me know. If it works for you please accept it. It's not difficult to accept. – Charles Xu Nov 19 '20 at 07:26
  • Sorry, I still need to pull from Github Package with public repository but without username and password. I know it will very specific by Github Package itself. But, that's what I want to find out. Sorry, your answer acceptable for the general question, but not for my current problem. – Bervianto Leo Pratama Nov 20 '20 at 02:06
  • If you use the Azure Web App, what I said is the answer. There is no other ways. – Charles Xu Nov 20 '20 at 05:44

1 Answers1

1

Well, if you pull the image from the public registry then you do not need to set the credential, and by default, the public registry is the docker hub. For other registries, private registry, you need to set the environment variable DOCKER_REGISTRY_SERVER_URL to tell the Web App to pull images from it. And set the DOCKER_REGISTRY_SERVER_USERNAME and DOCKER_REGISTRY_SERVER_PASSWORD for the credential. For a quick test, the image you used should be in the private registry. So you need to set the credential for it.

Charles Xu
  • 29,862
  • 2
  • 22
  • 39