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 backend docker commands as node instead of root
Maidul Islamfc9393b77fc9
diff --git a/backend/Dockerfile b/backend/Dockerfileindex 42bb6a263a..2c249717f8 100644--- a/backend/Dockerfile+++ b/backend/Dockerfile@@ -3,6 +3,8 @@ FROM node:16-alpine AS buildWORKDIR /app+ENV npm_config_cache /home/node/.npm+COPY package*.json ./RUN npm ci --only-production@@ -14,18 +16,23 @@ FROM node:16-alpineWORKDIR /app+ENV npm_config_cache /home/node/.npm+COPY package*.json ./RUN npm ci --only-productionCOPY --from=build /app .+RUN chown -R node:node /appRUN 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-HEALTHCHECK --interval=10s --timeout=3s --start-period=10s \+HEALTHCHECK --interval=10s --timeout=3s --start-period=10s \CMD node healthcheck.jsEXPOSE 4000-CMD ["npm", "run", "start"]\ No newline at end of file+USER node++CMD ["npm", "run", "start"]