-
Notifications
You must be signed in to change notification settings - Fork 439
Docker build args sourced from Shell environment variables #1599
Copy link
Copy link
Closed
Labels
area/manifestIssues about infrastructure-as-code templates.Issues about infrastructure-as-code templates.type/featureIssues that are new feature requests.Issues that are new feature requests.
Description
So we'd like to have copilot source environment variables from the shell that copilot is run in as build arguments into the docker build command. And it either already does this, and I am dumb, or it does not.
In my mind some form of the following might work:
manifest.yml:
image:
build:
dockerfile: path/to/dockerfile
context: context/dir
args:
SECRET_PASSWORD: {{ .Env.SECRET_PASSWORD_IN_SHELL_ENV }}In my shell:
export SECRET_PASSWORD_IN_SHELL_ENV="ssshthisissecret"
copilot deploy
# at some point this would happen: docker build -f Dockerfile --build-arg SECRET_PASSWORD=ssshthisissecretI thought maybe, perhaps, we were clever and ran the manifest file through go template before shoving it into a struct, but i'm either stupid, or we aren't doing this? Happy to provide a PR and shame on me for not running this in a debugger before opening this issue, but alas here we are.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/manifestIssues about infrastructure-as-code templates.Issues about infrastructure-as-code templates.type/featureIssues that are new feature requests.Issues that are new feature requests.