-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
28 lines (28 loc) · 1006 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
# Based on latest Node.js image
FROM node:latest
# Maintainer of the image
LABEL maintainer="[email protected]"
# Globally install required version of truffle
RUN npm install -g [email protected]
# Set ethrelay home directory as working directory
WORKDIR /ethrelay
# Copy package dependencies file from context to working directory
COPY package.json .
# Install package dependencies in working directory
RUN npm install
# Copy all required ethrelay files from context to working directory
COPY constants.js .
COPY contracts ./contracts
COPY migrations ./migrations
COPY test ./test
COPY truffle-config.js .
COPY utils ./utils
# Compile smart contracts in working directory
RUN truffle compile
# Add script to test if a given TCP host/port is available and make it executable
ADD https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh .
RUN chmod 755 wait-for-it.sh
# Execute truffle when running the image
ENTRYPOINT ["truffle"]
# Default argument for truffle
CMD ["--help"]