Retrieving AES Key when building image

build
jet
npm
docker

#1

Hello,

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.


#2

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?


#3

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


#4

FYI, build argument support is pretty close, see https://github.com/codeship/documentation/pull/572 for the PR to update our documentation :slight_smile: