forked from omni/tokenbridge-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (25 loc) · 770 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
FROM node:10 as contracts
WORKDIR /contracts
COPY package.json .
COPY package-lock.json .
RUN npm install --only=prod
COPY truffle-config.js truffle-config.js
COPY ./contracts ./contracts
RUN npm run compile
COPY flatten.sh flatten.sh
RUN bash flatten.sh
FROM node:10
WORKDIR /contracts
COPY --from=contracts /contracts/build ./build
COPY --from=contracts /contracts/flats ./flats
COPY ./deploy/package.json ./deploy/
COPY ./deploy/package-lock.json ./deploy/
RUN cd ./deploy; npm install --only=prod; cd ..
COPY ./upgrade/package.json ./upgrade/
COPY ./upgrade/package-lock.json ./upgrade/
RUN cd ./upgrade; npm install --only=prod; cd ..
COPY ./upgrade ./upgrade
COPY deploy.sh deploy.sh
COPY ./deploy ./deploy
ENV PATH="/contracts/:${PATH}"
ENV NOFLAT=true