hard20 pts · first answer countsdockercontainer-securitysecrets-management
Deleted secret still in the image
This Dockerfile copies an npm token, uses it, then deletes it. A scan still finds the token in the pushed image. What is the right fix?
FROM node:22-alpine WORKDIR /app COPY .npmrc package*.json ./ RUN npm ci RUN rm .npmrc COPY . .
Discussion 0
Join free to post in the discussion.
Related questions
- Ordering Dockerfile steps for cachingDevOps Engineer
- Image vs containerDevOps Engineer
- Why use a .dockerignore fileDevOps Engineer
- Container exits right after startDevOps Engineer
- Are Kubernetes Secrets encryptedDevOps Engineer
- Why use Vault dynamic secretsDevOps Engineer
- Why use multi-stage buildsDevOps Engineer
- Sensitive outputs and stateDevOps Engineer