Temporarily expose AWS secrets as files. Dedicated for use in Dockerfiles / docker builds.
Example usage: /onvault.sh npm install
Script will:
- Load secrets from AWS Secrets Manager,
- execute
npm install
, - delete secrets.
Script requires IAM privileges to access AWS Secrets Manager service.
- In Dockerfile add:
RUN curl -s -o /usr/local/bin/onvault https://raw.githubusercontent.com/UXPin/onvault/v2.0/onvault.sh && \ chmod +x /usr/local/bin/onvault
- Modify Dockerfile steps that require secrets:
RUN /onvault.sh git clone ...
When executing commands with quoted arguments they must be double quoted, e.g.:
onvault.sh bash -c "'make; make install'"
Running tests:
cd tests
make tests