我需要在 Hasura Docker Image 中安装 awscli 和 jq 库。我尝试使用 yum、apt-get 或 apk 命令来安装依赖项,但它们都不起作用。
Docker 镜像:https ://hub.docker.com/r/hasura/graphql-engine/
如何在 Hasura Docker Image 中安装这些依赖项?任何帮助表示赞赏。
Dockerfile:
FROM hasura/graphql-engine:latest
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
CMD ["./entrypoint.sh"]
入口点.sh:
#!/bin/sh
set -o errexit -o nounset -o pipefail
DB_HOST=${DB_HOST:-postgres}
DB_PORT=${DB_PORT:-5432}
if [ -z "${DB_NAME}" ]; then
echo "Must provide DB_NAME environment variable. Exiting...."
exit 1
fi
if [ -z "${DB_USER}" ]; then
echo "Must provide DB_USER environment variable. Exiting...."
exit 1
fi
if [ -z "${DB_PASSWORD}" ]; then
echo "Must provide DB_PASSWORD environment variable. Exiting...."
exit 1
fi
export HASURA_GRAPHQL_DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
/bin/graphql-engine serve
DB_PASSWORD使用 KMS 加密,所以我想在设置环境变量之前使用 aws cli 解密 entrypoint.sh 文件中的密码:HASURA_GRAPHQL_DATABASE_URL