We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1b03dcd + 60548cc commit 156d39fCopy full SHA for 156d39f
Dockerfile
@@ -1,14 +1,11 @@
1
-FROM node:21-alpine
2
-
3
-# Create app directory
4
-WORKDIR /mockbin
5
6
-RUN npm update -g npm
7
8
-COPY package.json ./
9
-RUN npm i --omit=dev
10
-COPY . .
11
+FROM node:21.6.2-bullseye-slim
+
+RUN apt-get update && apt-get install -y --no-install-recommends dumb-init
+ENV NODE_ENV production
+WORKDIR /usr/src/app
+COPY --chown=node:node . .
+RUN npm ci --only=production
+USER node
12
ENV MOCKBIN_REDIS "redis://redis:6379"
13
EXPOSE 8080
14
-CMD ["npm", "start"]
+CMD ["dumb-init", "node", "server.js"]
0 commit comments