Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
run full backend docker image as node user
Maidul Islam04b7e04d989f
diff --git a/backend/Dockerfile b/backend/Dockerfileindex 2c249717f8..c80ef18b53 100644--- a/backend/Dockerfile+++ b/backend/Dockerfile@@ -2,6 +2,7 @@FROM node:16-alpine AS buildWORKDIR /app+USER nodeENV npm_config_cache /home/node/.npm@@ -14,7 +15,12 @@ RUN npm run build# Production stageFROM node:16-alpine+RUN apk add --no-cache bash curl && curl -1sLf \+ 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' | bash \+ && apk add infisical=0.8.1+WORKDIR /app+USER nodeENV npm_config_cache /home/node/.npm@@ -22,17 +28,10 @@ COPY package*.json ./RUN npm ci --only-productionCOPY --from=build /app .-RUN chown -R node:node /app--RUN apk add --no-cache bash curl && curl -1sLf \- 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' | bash \- && apk add infisical=0.8.1HEALTHCHECK --interval=10s --timeout=3s --start-period=10s \CMD node healthcheck.jsEXPOSE 4000-USER node-CMD ["npm", "run", "start"]