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.
1 parent d00991d commit 41d4332Copy full SHA for 41d4332
Dockerfile
@@ -1,10 +1,15 @@
1
-FROM node:alpine
+# Do npm install with full image
2
+FROM mhart/alpine-node:latest
3
LABEL maintainer="jakewmeyer@gmail.com"
-# Needs password as placeholder for redis-connection
4
ENV REDISCLOUD_URL=redis://default:default@redis_db:6379
5
-WORKDIR /usr/src/app
6
-COPY package*.json ./
+WORKDIR /app
+COPY package.json package-lock.json ./
7
RUN npm install --production
8
+
9
+# And then copy over node_modules, etc from that stage to the smaller base image
10
+FROM mhart/alpine-node:base
11
12
+COPY --from=0 /app .
13
COPY . .
14
EXPOSE 5000
-CMD [ "npm", "start" ]
15
+CMD ["node", "src/app.js"]
0 commit comments