feat: add docker image
This commit is contained in:
parent
5a0144f995
commit
c111333c0d
3 changed files with 44 additions and 1 deletions
17
.dockerignore
Normal file
17
.dockerignore
Normal 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
6
.gitignore
vendored
|
@ -3,8 +3,12 @@
|
|||
# editors
|
||||
!/.vscode
|
||||
|
||||
# git
|
||||
# ignores
|
||||
!/.gitignore
|
||||
!/.dockerignore
|
||||
|
||||
# docker
|
||||
!/Dockerfile
|
||||
|
||||
# makefile
|
||||
!/makefile
|
||||
|
|
22
Dockerfile
Normal file
22
Dockerfile
Normal 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
|
Loading…
Reference in a new issue