From cb636d020173035dd51f4aa7fb4d48f511320d5e Mon Sep 17 00:00:00 2001 From: Jesse McDonald Date: Fri, 24 Sep 2021 23:58:33 -0500 Subject: [PATCH] use a specific version of the node base image for Docker builds --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 75c111b..79cbcc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,16 @@ # syntax=docker/dockerfile:1 -FROM node:16-alpine +FROM node:16-alpine3.13 AS base + +FROM base AS builder MAINTAINER Jesse McDonald WORKDIR /app RUN apk add --no-cache python2 make gcc g++ musl-dev COPY . . RUN yarn install --production -FROM node:16-alpine +FROM base MAINTAINER Jesse McDonald WORKDIR /app -COPY --from=0 /app . +COPY --from=builder /app . ENV PORT=80 CMD ["node", "./server.js"]