-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customize Docker Image #2729
Labels
Comments
@mthota15 Can you not decrypt the password and provide it as an environment variable? Our docker image is highly optimised and it will not be possible to install the required tools on that. You'll have to build a custom docker image with a dockerfile that might look like this: FROM hasura/graphql-engine:v1.0.0-beta.4 as base
FROM debian:stretch-20190228-slim
# install libpq (required by Hasura)
# also install aws-cli, jq etc
RUN apt-get -y update \
&& apt-get install -y libpq-dev \
&& apt-get -y auto-remove \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /usr/share/doc/ \
&& rm -rf /usr/share/man/ \
&& rm -rf /usr/share/locale/
# copy hausra binary from base container
COPY --from=base /bin/graphql-engine /bin/graphql-engine
# write a startup script which decrypts the password and starts graphql engine
# command to start graphql engine is
# graphql-engine --database-url <url> serve
COPY start.sh /start.sh
CMD ["/start.sh"] PS: this is not tested. |
Thanks @shahidhk, It helped. Here is my Dockerfile
entrypoint.sh:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Our RDS Password is KMS Encrypted and we have to decrypt the password in the docker image during runtime. We usually use aws cli with jq to decrypt the password in docker containers. We would like to use the same approach with Hasura docker container but not sure how to install aws cli and jq dependencies in the container.
Any guidance is appreciated.
The text was updated successfully, but these errors were encountered: