-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (20 loc) · 737 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (20 loc) · 737 Bytes
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
FROM node:16
RUN mkdir /home/node/group-car-api \
&& mkdir /home/node/group-car-api/node_modules \
&& chown -R node:node /home/node/group-car-api
WORKDIR /home/node/group-car-api
RUN touch .env
COPY package.json ./
COPY yarn.lock ./
RUN apt-get update \
&& apt-get install --no-install-recommends -y libpango1.0-dev gir1.2-pango-1.0 libcairo2-dev libcairo-gobject2 gobject-introspection libgirepository1.0-dev libxml2-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN npm_config_build_from_source=true yarn add canvas \
&& yarn install \
&& yarn cache clean
COPY --chown=node:node . .
RUN yarn tsc
ENV NODE_ENV=production
EXPOSE 8080
CMD ["node", "-r", "tsconfig-paths/register", "./build/group-car.js"]