Wrong encryption key in generated docker image
Issue Description
Current Dockerfile cannot import user-defined encryption keys.
Steps to Reproduce
- Generate the following encryption keys, add them in .env file.
- NEXT_PRIVATE_ENCRYPTION_KEY
- NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY
- Run
./docker/buildx.sh
Expected Behavior
The generated image shall use user-defined keys in .env file.
Current Behavior
The generated image always use the hard-coded "CAFEBABE" and "DEADBEEF" as encryption keys.
Screenshots (optional)
Operating System [e.g., Windows 10]
Linux
Browser [e.g., Chrome, Firefox]
No response
Version [e.g., 2.0.1]
1.9.0
Please check the boxes that apply to this issue report.
- [x] I have searched the existing issues to make sure this is not a duplicate.
- [x] I have provided steps to reproduce the issue.
- [x] I have included relevant environment information.
- [x] I have included any relevant screenshots.
- [ ] I understand that this is a voluntary contribution and that there is no guarantee of resolution.
- [x] I want to work on creating a PR for this issue if approved
Thank you for opening your first issue and for being a part of the open signing revolution!
One of our team members will review it and get back to you as soon as it possible 💚
Meanwhile, please feel free to hop into our community in Discord
My proposal is as following,
- Pass in keys via
--build-argin all build scripts,
--build-arg NEXT_PRIVATE_ENCRYPTION_KEY="$NEXT_PRIVATE_ENCRYPTION_KEY" \
--build-arg NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY="$NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY" \
- Add a
docker:buildscript in root package.json (avoid adding a second .env file in /docker folder).
"docker:build": "npm run with:env -- ./docker/buildx.sh",
Happy to provide a PR if the team thinks ok. Thanks for sharing such a great work!
Had this same problem even on the 1.2.0 versions. I haven't updated yet to see on the latest. It was a pain in the but. I just used the cert content option which is probably where they are going to. ( Thats a guess)