Open rasmuswikman opened 3 years ago
Hi @rasmuswikman. Thank you for your report. To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this
@magento export issue to JIRA project PWA as Story
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/PWA-2842 is successfully created for this GitHub issue.
Hi @rasmuswikman is this ticket still necessary?
I see you have set runtime variables
--set-env-vars "MAGENTO_BACKEND_URL=${{ secrets.MAGENTO_BACKEND_URL }}" \
--set-env-vars "MAGENTO_BACKEND_EDITION=${{ secrets.MAGENTO_BACKEND_EDITION }}"
So, what is the use-case for providing build time variables with --build-arg
?
Describe the request
Currently there is a Dockerfile called
prod.dockerfile
that uses the environment filedocker/.env.docker.prod
.If I understand correctly, the only way to change these variables is by editing the
docker/.env.docker.prod
directly when deploying to production. Either manually or by variable substitution in a CI/CD pipeline.Possible solutions
By using
--build-arg
s indocker build
command, the variables can can be specified instead of only usingredacted
as now in thedocker/.env.docker.prod
file.Example of using
--build-arg
s in a Dockerfile:Example of using
--build-arg
s in a GitHub workflow:Please let us know whether this is a new topic or a topic change request:
Full working files for deployment to Google Cloud Run
Dockerfile:
Deployment file: