forked from opengs/uashield
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (19 loc) · 774 Bytes
/
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
FROM node:16.9.0-alpine AS builder
WORKDIR /code
COPY yarn.lock ./yarn.lock
COPY .yarnrc ./.yarnrc
COPY packageheadless.json ./package.json
# no need to --frozen-lockfile
# from docs - If yarn.lock is present and is enough to satisfy all the dependencies listed in package.json,
# the exact versions recorded in yarn.lock are installed, and yarn.lock will be unchanged.
# Yarn will not check for newer versions.
RUN yarn install
COPY . .
COPY tsconfig.headless.json ./tsconfig.json
RUN yarn build:headless
# Optimizes the build, so no NODE_MODULES included in image. Don't remove this
FROM node:16.9.0-alpine
WORKDIR /code
COPY packageheadless.json ./package.json
COPY --from=builder /code/build/headless/ ./build/headless/
ENTRYPOINT ["yarn", "start:headless"]