Retrieving AES Key when building image




I’m trying to workaround the lack of Docker Build Args support by encrypting my sensitive .npmrc file and decrypting it at build time. For this I have updated my Dockerfile to download Jet binary and copy codeship.aes into the target container. This works fine for locally, but since there’s no such file available when CS’ building the image, the build fails. I’m wondering if there’s a way to retrieve my project’s AES key at build time.


Hey Francis,

there is no way to access the AES key during the build. We’re working on supporting Docker build arguments, in the meantime could you add the npmrc file to a base image or pull the file from an external resource during the build?


I think I’ll get away with the base image approach. Thanks for the suggestion!


FYI, build argument support is pretty close, see for the PR to update our documentation :slight_smile: