forked from vivekratnavel/omniboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (20 loc) · 799 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
28
29
30
# build environment
FROM node:12.13.0 as builder
RUN mkdir -p /usr/omniboard
WORKDIR /usr/omniboard
ENV PATH=/usr/omniboard/node_modules/.bin:$PATH GENERATE_SOURCEMAP=false
# install yarn
RUN npm install -g yarn
COPY . /usr/omniboard
RUN yarn run prepublishOnly
EXPOSE 9000
FROM node:12-alpine
WORKDIR /usr/omniboard
RUN apk add --no-cache tini
# Having "--" at the end will enable passing command line args to npm script
ENTRYPOINT ["/sbin/tini", "--", "yarn", "run", "prod"]
ENV PATH /usr/omniboard/node_modules/.bin:$PATH
COPY --from=builder /usr/omniboard/package.json /usr/omniboard/package.json
COPY --from=builder /usr/omniboard/dist /usr/omniboard/dist
COPY --from=builder /usr/omniboard/web/build /usr/omniboard/web/build
RUN yarn install --production && yarn cache clean --force