I have a Docker build image that does a COPY . . and it assumes there is a .netrc file for fetching a private repository via go dep. The .netrc file is not something I commit and instead I generate the file during the CI process, which grabs an access token from an environment variable.
I need this .netrc file in there during the Docker build process for the circleci/aws-ecr orb.
Is there any way I can restore the vendor folder from a cache during this workflow job or a way to do a pre-step, such as make netrc, inside the working directory of the orb before the orb builds the Docker image?
- aws-ecr/build_and_push_image:
repo: myrepo
tag: latest
path: .
dockerfile: Dockerfile
attach-workspace: true
requires:
- test_and_build
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/