Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 如何将用户添加到pgAdmin docker部署_Amazon Web Services_Docker_Amazon Rds_Gitlab Ci_Pgadmin - Fatal编程技术网

Amazon web services 如何将用户添加到pgAdmin docker部署

Amazon web services 如何将用户添加到pgAdmin docker部署,amazon-web-services,docker,amazon-rds,gitlab-ci,pgadmin,Amazon Web Services,Docker,Amazon Rds,Gitlab Ci,Pgadmin,我目前正在运行pgAdmin作为docker部署,以连接到我们的postgres RDS实例。问题是,我经常重新部署这个pgAdmin服务器,这意味着必须经常重新创建用户帐户。有人知道我如何编写这~5个用户帐户的创建脚本,以便将其作为一个步骤包含在CI管道中吗?谢谢你的帮助/建议 如果您的问题可以通过docker中的bash脚本解决。然后在名为docker-entrypoint.sh的文件中编写bash脚本,并将这些行添加到Dockerfile中 ADD . /usr/src/app ENTR

我目前正在运行pgAdmin作为docker部署,以连接到我们的postgres RDS实例。问题是,我经常重新部署这个pgAdmin服务器,这意味着必须经常重新创建用户帐户。有人知道我如何编写这~5个用户帐户的创建脚本,以便将其作为一个步骤包含在CI管道中吗?谢谢你的帮助/建议

如果您的问题可以通过docker中的bash脚本解决。然后在名为docker-entrypoint.sh的文件中编写bash脚本,并将这些行添加到Dockerfile中

ADD . /usr/src/app 
ENTRYPOINT ["bash", "/usr/src/app/docker-entrypoint.sh"]
这里有一个同样的例子

Dockerfile

FROM ubuntu:18.04

RUN apt-get update

# ENV IN_DOCKER=1

# Adding files
ADD . /usr/src/app

#CMD exec /usr/src/app/docker-entrypoint.sh
ENTRYPOINT ["bash", "/usr/src/app/docker-entrypoint.sh"]
docker-entrypoint.sh

#!/bin/bash
python3 manage.py migrate                  # Apply database migrations    

感谢您的建议,但我更感兴趣的是,是否有一个pgadmin cli可用于添加用户。我似乎找不到答案。