File tree Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Expand file tree Collapse file tree 2 files changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ target /
2
+ scripts /
3
+ node_modules
4
+ Dockerfile
5
+ docker-compose.yml
Original file line number Diff line number Diff line change
1
+ FROM rust:1.40 as builder
2
+
3
+
4
+
5
+ WORKDIR /usr/src/app
6
+
7
+ COPY . .
8
+
9
+ RUN cargo install --path validator_worker --all-features
10
+
11
+ WORKDIR /usr/local/bin
12
+
13
+ RUN cp $CARGO_HOME/bin/validator_worker .
14
+
15
+ FROM ubuntu:18.04
16
+
17
+ # `ethereum` or `dummy`
18
+ ENV ADAPTER=
19
+
20
+ # only applicable if you use the `--adapter ethereum`
21
+ ENV KEYSTORE_FILE=
22
+ ENV KEYSTORE_PWD=
23
+
24
+ # Only applicable if you use the `--adapter dummy`
25
+ ENV DUMMY_IDENTITY=
26
+
27
+ # If set it will override the configuration file used
28
+ ENV CONFIG=
29
+ # Defaults to `http://127.0.0.1:8005`
30
+ ENV SENTRY_URL=
31
+ # Set to any value to run the `validator_worker` in `single tick` mode
32
+ # default: `infinite`
33
+ ENV SINGLE_TICK=
34
+
35
+ RUN echo ${KEYSTORE_FILE:+-k $KEYSTORE_FILE} ${SENTRY_URL:+-u $SENTRY_URL}
36
+
37
+ WORKDIR /usr/local/bin
38
+
39
+ RUN apt update && apt-get install -y libssl-dev
40
+
41
+ COPY --from=builder /usr/local/bin/validator_worker .
42
+
43
+ ENTRYPOINT [ \
44
+ "sh" , "-c" , \
45
+ "validator_worker" , \
46
+ "-a" , "${ADAPTER:-ethereum}" , \
47
+ "${DUMMY_IDENTITY:+-i $DUMMY_IDENTITY}" , \
48
+ "${KEYSTORE_FILE:+-k $KEYSTORE_FILE}" , \
49
+ "${SINGLE_TICK:+-t}" , \
50
+ "${SENTRY_URL:+-u $SENTRY_URL}" , "${CONFIG}" \
51
+ ]
You can’t perform that action at this time.
0 commit comments