Hi,
How do I pull a private image from ECR ?
Am using below config.
version: 2
jobs:
unit_test:
docker:
- image: ${ECR}/foo:latest
- auth:
username: xx
password: xx
The username and password are not static and they expire every 12hrs on ECR, I believe.
Using remote-docker engine, am able to pull the repo.
However, need the private container to run in the primary environment.
Is there a way to get the creds dynamically, such as running a script prior to pulling the image from ECR?
Nice, this is basically what I had planned to do. However, it would still require a way to run commands before you designate the image, which it seems is not possible.
I haven’t tried this together with circleci myself, but I figure that If you bake the credential helper into the build image together with the credHelpers configuration, then you only need to configure circleci to provide the aws credentials. In that setup, I don’t think you don’t need to run any commands. docker pull will run without docker login.