You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
This commit: ddc3ae0 broke the docker build of the new storefront by putting everything into quotes and thereby exporting a string instead of exporting env vars and running next build.
@mikemurray I only found this commit when investigating how this was introduced, but not a PR this belongs to.
To Reproduce
Run a docker build, notice that the actual build step finished immediately.
The text was updated successfully, but these errors were encountered:
janus-reith
changed the title
Production docker builds are broken due to linted Dockerfile
Production docker builds are broken due to some change Dockerfile
Jun 29, 2020
janus-reith
changed the title
Production docker builds are broken due to some change Dockerfile
Production docker builds are broken due to some change in the Dockerfile
Jun 29, 2020
@mikemurray Yes sounds good, although I would also be fine with a different syntax for this if there is any for this that would pass hadolint, or some other way to use env vars in general.
It actually took me some trial and error aswell to find out what to put in curly braces here, I didn't actually believe this one with the nested ${} to be the correct approach but had tried others that didn't work.
To give some background:
The current solution is just something I came up with after fiddling around with the Docker and nextjs builds for a longer time to be able to create different builds with separated environments from one codebase, as the env needs to be present at build time now.
Somehow I found no more generic solution for this, except for manually passing all the args to the build separately, then passing them forward in the dockerfile, which seemed really unintuitive.
That's why I chose NEXTJS_DOTENV as the only env var that needs to be passed(defaults to "prod" as fallback), which then points to the actual file with the relevant env vars.
Type: major
Describe the bug
This commit: ddc3ae0 broke the docker build of the new storefront by putting everything into quotes and thereby exporting a string instead of exporting env vars and running
next build
.@mikemurray I only found this commit when investigating how this was introduced, but not a PR this belongs to.
To Reproduce
Run a docker build, notice that the actual build step finished immediately.
The text was updated successfully, but these errors were encountered: