Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodeJSTypeScript template: use secrets to authenticate with private npm registry #217

Open
escherstair opened this issue Aug 2, 2024 · 0 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@escherstair
Copy link
Contributor

escherstair commented Aug 2, 2024

I open here this issue following this topic on Toradex community.
Quick summary:

  • I have private npm registry that requires authentication (secrets splitted into two .npmrc files:_ one in the project folder and the other one in the user home)
  • this secrets are necessary to build the docker container
  • the secrets shoud be used in a secure way (i.e., not leaving them in the docker layers)
  • templates use docker compose build ....
  • from Docker support

    To make a secret available at build time using Docker Compose, you would typically use build arguments. However, as previously mentioned, this method is not secure for sensitive data, as the build arguments can be cached in the Docker layers.
    Unfortunately, as of Docker Compose version 1.25.0+, the ability to use Docker secrets during the build process is not supported. The secrets are only available to the services at runtime, not at build time.

    If you need to use secrets during the build process, you might need to consider other methods.

Has someone else this need?
Is it possible to find a workaround?

@microhobby microhobby added help wanted Extra attention is needed question Further information is requested labels Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants