0

I am unable to run docker image dpage/pgadmin4 on azure web app (Linux) which is available on docker hub.

I have installed Docker in my Linux machine and was able to run that docker image locally. Then I created Web app in Azure with options as given below:

  • OS: Linux
  • Publish: Docker Image
  • App service plan: Linux app service

After creating web app, I added two env variables in App Settings section:

PGADMIN_DEFAULT_EMAIL : user@domain.com
PGADMIN_DEFAULT_PASSWORD : SuperSecret

Finally login screen is visible but when I enter above credentials, it doesn't work and keeps redirecting to login page.

Update: If login is working properly, screen appears as shown below. !(pgadmin initial screen)

4

1 回答 1

0

对于你的问题,我做了测试,发现真的很奇怪。当我通过Azure CLI在Azure服务Web App for Container中部署docker镜像dpage/pgadmin4并设置应用设置时,使用用户名和密码登录没有问题。但是当我通过 Azure 门户部署它时,我遇到了同样的事情。

不知道是什么原因,但解决方案是设置环境变量PGADMIN_DEFAULT_EMAILPGADMIN_DEFAULT_PASSWORD通过 Azure CLI 如下所示:

az webapp config appsettings set --resource-group <resource-group-name> --name <app-name> --settings PGADMIN_DEFAULT_EMAIL="user@domain.com" PGADMIN_DEFAULT_PASSWORD="SuperSecret"

如果你真的想知道原因,那么你可以向微软反馈。也许这是一个错误或一些特殊设置。

更新

我这边的测试截图在这里:

在此处输入图像描述

于 2019-05-11T07:18:27.873 回答