forked from credebl/mediator-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (34 loc) · 1.03 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
51
FROM node:20.18-bullseye-slim as base
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -y && \
apt-get install --no-install-recommends -y apt-transport-https curl make \
gcc g++ gpg python3 python3-pip && \
corepack enable
# Set cache dir so it can be shared between
# different docker stages
# RUN mkdir -p /tmp/yarn-cache && \
# yarn config set cache-folder /tmp/yarn-cache
FROM base as setup
WORKDIR /opt
# Copy root core files
COPY package.json /opt/package.json
COPY yarn.lock /opt/yarn.lock
COPY patches /opt/patches
# Run yarn install
RUN yarn install --immutable
COPY tsconfig.build.json /opt/tsconfig.build.json
COPY . /opt
RUN yarn build
FROM setup as final
WORKDIR /opt
COPY --from=setup /opt/build /opt/build
# COPY --from=setup /tmp/yarn-cache /tmp/yarn-cache
# Copy root package files and mediator
# app package
COPY package.json /opt/package.json
COPY yarn.lock /opt/yarn.lock
# # Copy patches folder
COPY patches /opt/patches
RUN yarn install --immutable && \
yarn cache clean
# ENTRYPOINT [ "yarn", "start" ]