feat: add docker image

This commit is contained in:
Dmitriy Pleshevskiy 2022-03-22 10:15:23 +03:00
parent 5a0144f995
commit c111333c0d
3 changed files with 44 additions and 1 deletions

17
.dockerignore Normal file
View File

@ -0,0 +1,17 @@
/*
# makefile
!/makefile
# config
!/.eslintrc.yml
!/tsconfig.json
# node modules
!/package.json
!/package-lock.json
# sources
!/src
!/static

6
.gitignore vendored
View File

@ -3,8 +3,12 @@
# editors
!/.vscode
# git
# ignores
!/.gitignore
!/.dockerignore
# docker
!/Dockerfile
# makefile
!/makefile

22
Dockerfile Normal file
View File

@ -0,0 +1,22 @@
FROM node:16.14.2-alpine3.14
WORKDIR /app
RUN apk update \
&& apk upgrade \
&& apk add --no-cache bash git openssh make
COPY package*.json ./
RUN npm install
COPY . .
RUN make build \
&& npm prune --production \
&& apk del bash git openssh
EXPOSE 30000
CMD make start