id - this has to match the id from the mount secret command src - path to file locally docker build --no-cache . -t test-backend --secret id=npmrc,src=backend/.npmrc --file backend/dockerfile
## Mount secrets commannd
Part of the docker build kit, enabled by default
A way of securely mounting secrets
The secret will not be in the final image, one to use for example performing the command npm ci
.
RUN --mount=type=secret,mode=0644,id=npmrc,target=/usr/src/app/.npmrc npm ci --only-production