forked from UMAprotocol/protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (28 loc) · 1.5 KB
/
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
# This docker container can be pulled from umaprotocol/protocol on dockerhub. This docker container is used to access
# all components of the UMA ecosystem. The entry point into the bot is defined using a COMMAND enviroment variable
# that defines what is executed in the root of the protocol package. This container also contains other UMA packages
# that are not in the protocol repo, such as the Across v2 relayer. To access these set a command
# Fix node version due to high potential for incompatibilities.
FROM node:14
# All source code and execution happens from the protocol directory.
WORKDIR /protocol
# Copy the latest state of the repo into the protocol directory.
COPY . ./
# Install dependencies and compile contracts.
RUN apt-get update
RUN apt-get install -y libudev-dev libusb-1.0-0-dev jq yarn rsync
RUN yarn
# Clean and run all package build steps, but exclude dapps (to save time).
RUN yarn clean
RUN yarn qbuild
# Set up additional UMA packages installed in this docker container.
# Configuer the across v2 relayer as a "across-relayer" base package.
WORKDIR /across-relayer
# Clode the relayer code and copy it to the across-relayer directory. Remove the package directory.
RUN git clone https://github.com/across-protocol/relayer-v2.git .
# Install depdencies.
RUN yarn && yarn build
# Set back the working directory to the protocol directory to default to that package.
WORKDIR /protocol
# Command to run any command provided by the COMMAND env variable.
ENTRYPOINT ["/bin/bash", "scripts/runCommand.sh"]