use a specific version of the node base image for Docker builds
This commit is contained in:
parent
17a4590a6e
commit
cb636d0201
|
|
@ -1,14 +1,16 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
FROM node:16-alpine
|
FROM node:16-alpine3.13 AS base
|
||||||
|
|
||||||
|
FROM base AS builder
|
||||||
MAINTAINER Jesse McDonald <nybble41@gmail.com>
|
MAINTAINER Jesse McDonald <nybble41@gmail.com>
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN apk add --no-cache python2 make gcc g++ musl-dev
|
RUN apk add --no-cache python2 make gcc g++ musl-dev
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN yarn install --production
|
RUN yarn install --production
|
||||||
|
|
||||||
FROM node:16-alpine
|
FROM base
|
||||||
MAINTAINER Jesse McDonald <nybble41@gmail.com>
|
MAINTAINER Jesse McDonald <nybble41@gmail.com>
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=0 /app .
|
COPY --from=builder /app .
|
||||||
ENV PORT=80
|
ENV PORT=80
|
||||||
CMD ["node", "./server.js"]
|
CMD ["node", "./server.js"]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue