I can build locally but not within Docker
See original GitHub issueHello all,
The time for deploying my first app version has arrived and I am trying to build successfully in production mode. If I run npm run build:production everything goes well and I see sentry plugin working ok (I do not get any build errors).
However, if I want to build a Docker image with the production stuff running this:
DOCKER_BUILDKIT=1 docker build -f ./config/Dockerfile --target=production -t kindoiserver:production .
Then first I get the following error:
#15 11.13 ERROR in Sentry CLI Plugin: Unable to determine version. Make sure to include
releaseoption or use the environment that supports auto-detection https://docs.sentry.io/cli/releases/#creating-releases #15 11.16 npm ERR! code ELIFECYCLE
Which I solve adding the release field as follows:
new SentryWebpackPlugin({
include: outputPath,
configFile: path.resolve(configPath, 'sentryConfig.properties'),
ignore: ['node_modules', 'config', '.vscode', 'logs', 'assets'],
release: process.env.npm_package_version
}),
Then after this I get this other error:
ERROR in Sentry CLI Plugin: Command failed: /opt/app/server/node_modules/@sentry/cli/sentry-cli releases new 1.0.0 #15 10.83 INFO 2020-09-25 16:04:45.668584209 +00:00 sentry-cli was invoked with the following command line: "/opt/app/server/node_modules/@sentry/cli/sentry-cli" "releases" "new" "1.0.0" #15 10.83 error: API request failed #15 10.83 caused by: [60] SSL peer certificate or SSH remote key was not OK
Why do I not need the release field when building locally in my machine without Docker? What about that SSL? Is this the expected behavior?
Thank you in advance and regards.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Just in case is useful for someone in future I did not know node Docker image was based on Debian so I have got rid of the SSL error doing this within the image build:
RUN apt-get update && apt-get install -y ca-certificates
For the release error one I have ended up playing around with some environment variables rather than relying on Git. I do not fancy copying over the Git folder to the Docker image.
I close this @kamilogorek. Thanks for your help!
I don’t know what image or what your Dockerfile configuration is, but it’s usually caused by
.git
directory, orgit
command itself not being accessible. We are doing a release proposal based on the VCS that the project uses.It’s definitely not, however it’s most likely caused by the docker image missing certificates configuration. You can verify this by disabling ssl for sentry-cli using
configFile
option in webpack plugin in conjunction withverify_ssl
config - https://docs.sentry.io/product/cli/configuration/