I have a project with NextJS and I build it using Jenkins. I run my app inside a docker container, and pull my code from Github.

In my local project, I have a git-ignored file named .sentrylirc that includes my authentication token to Sentry (3rd party monitoring library), which I need to move to the root of my project.

How can I move this file inside my docker container before my build? Where should I store it?


1 Answer 1


You shouldn't bake these kinds of credentials into the docker container. Instead, you should use some kinda secret storage to hold the secret and load it before you start the application.

Basically, when the docker container starts, whatever started the container should securely retrieve the credentials and set it as an environment variable or the container should fetch the secret.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.