forked from DeNeutoy/varnish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (33 loc) · 910 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
31
32
33
34
35
36
37
38
39
40
41
42
FROM node:10.15.2
# Setup a spot for our code
WORKDIR /usr/local/src/varnish
# Install dependencies
COPY package.json yarn.lock ./
RUN yarn install
# Install demo dependencies
COPY demo/package.json demo/yarn.lock ./demo/
WORKDIR /usr/local/src/varnish/demo
RUN yarn install
WORKDIR /usr/local/src/varnish
# Copy in the source code
COPY . .
# This tells build scripts and libraries that we're in development, so they
# can include stuff that's helpful for debugging even if it's a tad slower.
ARG NODE_ENV=development
ENV NODE_ENV $NODE_ENV
ARG BABEL_ENV=development
ENV BABEL_ENV $BABEL_ENV
# Build the UI
RUN yarn build
RUN yarn link
# Link React
WORKDIR /usr/local/src/varnish/node_modules/react
RUN yarn link
# Build the demo
WORKDIR /usr/local/src/varnish/demo
RUN yarn link @allenai/varnish
RUN yarn link react
RUN yarn build
# By default we start the demo
ENTRYPOINT [ "yarn" ]
CMD [ "start" ]