forked from REAN-Foundation/reancare-service
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
50 lines (46 loc) · 1.08 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM node:18.12.0-alpine3.15 AS builder
ADD . /app
RUN apk add bash
RUN apk add --no-cache \
python3 \
py3-pip \
&& pip3 install --upgrade pip \
&& pip3 install \
awscli \
&& rm -rf /var/cache/apk/*
RUN apk add --update alpine-sdk
RUN apk add chromium \
harfbuzz
WORKDIR /app
COPY package*.json /app/
RUN npm install -g typescript
COPY src ./src
COPY tsconfig.json ./
RUN npm cache clean --force
RUN rm -rf node_modules
# RUN npm rm @types/glob @types/rimraf minimatch @types/minimatch
RUN npm install
RUN npm run build
##RUN npm run build
FROM node:18.12.0-alpine3.15
RUN apk add bash
RUN apk add --no-cache \
python3 \
py3-pip \
&& pip3 install --upgrade pip \
&& pip3 install \
awscli \
&& rm -rf /var/cache/apk/*
RUN apk add --update alpine-sdk
RUN apk add chromium \
harfbuzz
RUN apk update
RUN apk upgrade
ADD . /app
WORKDIR /app
COPY package*.json /app/
RUN npm install pm2 -g
RUN npm install sharp
COPY --from=builder ./app/dist/ .
RUN chmod +x /app/entrypoint.sh
ENTRYPOINT ["/bin/bash", "-c", "/app/entrypoint.sh"]