forked from 0xProject/0x-launch-kit-frontend
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
28 lines (22 loc) · 825 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
# Stage 1
FROM node:8-alpine as react-build
WORKDIR /app
RUN apk update && \
apk upgrade && \
apk add --no-cache --virtual build-dependencies bash git openssh python make g++ musl-dev \
gcc python3-dev libusb-dev eudev-dev linux-headers libc-dev
RUN git clone https://github.com/echoprotocol/0x-monorepo.git
COPY . .
RUN cd ./0x-monorepo && yarn install && yarn build && yarn workspaces run link
RUN yarn link 0x.js @0x/web3-wrapper @0x/connect @0x/order-utils @0x/typescript-typings
RUN yarn cache clean
RUN yarn --no-cache --frozen-lockfile
RUN yarn remove babel-jest
RUN yarn add [email protected]
RUN yarn build
RUN apk del build-dependencies
# Stage 2 - the production environment
FROM nginx:alpine
COPY --from=react-build /app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]