add a Docker configuration to run the server in a container

This commit is contained in:
Jesse D. McDonald 2021-09-24 21:07:59 -05:00
parent 4180cf05e2
commit 107526f555
1 changed files with 13 additions and 0 deletions

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
# syntax=docker/dockerfile:1
FROM node:16-alpine
MAINTAINER Jesse McDonald <nybble41@gmail.com>
WORKDIR /app
RUN apk add --no-cache python2 make gcc g++ musl-dev
COPY . .
RUN yarn install --production
FROM node:16-alpine
MAINTAINER Jesse McDonald <nybble41@gmail.com>
WORKDIR /app
COPY --from=0 /app .
CMD ["node", "./server.js"]