forked from smartcontractkit/chainlink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chainlink.Dockerfile
82 lines (62 loc) · 2.5 KB
/
chainlink.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# MAKE ALL CHANGES WITHIN THE DEFAULT WORKDIR FOR YARN AND GO DEP CACHE HITS
# THIS LINE IS AUTOGENERATED BY smartcontractkit/docker-cache/src/utils/update-docker-files.ts, DO NOT CHANGE MANUALLY
FROM smartcontract/builder-cache:1.0.34-2020-06-07T0002Z
# Have to reintroduce ENV vars from builder image
ENV PATH /go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
COPY GNUmakefile VERSION ./
# Install yarn dependencies
COPY yarn.lock package.json .yarnrc ./
COPY patches patches
COPY solc_bin solc_bin
COPY .yarn .yarn
COPY operator_ui/package.json ./operator_ui/
COPY styleguide/package.json ./styleguide/
COPY tools/json-api-client/package.json ./tools/json-api-client/
COPY tools/local-storage/package.json ./tools/local-storage/
COPY tools/redux/package.json ./tools/redux/
COPY tools/ts-helpers/package.json ./tools/ts-helpers/
COPY belt/package.json ./belt/
COPY belt/bin ./belt/bin
COPY evm-test-helpers/package.json ./evm-test-helpers/
COPY evm-contracts/package.json ./evm-contracts/
RUN make yarndep
COPY tsconfig.cjs.json tsconfig.es6.json ./
COPY operator_ui ./operator_ui
COPY styleguide ./styleguide
COPY tools/json-api-client ./tools/json-api-client
COPY tools/local-storage ./tools/local-storage
COPY tools/redux ./tools/redux
COPY tools/ts-helpers ./tools/ts-helpers
COPY belt ./belt
COPY belt/bin ./belt/bin
COPY evm-test-helpers ./evm-test-helpers
COPY evm-contracts ./evm-contracts
# Build operator-ui and the smart contracts
RUN make contracts-operator-ui-build
# Build the golang binary
# THIS LINE IS AUTOGENERATED BY smartcontractkit/docker-cache/src/utils/update-docker-files.ts, DO NOT CHANGE MANUALLY
FROM smartcontract/builder-cache:1.0.34-2020-06-07T0002Z
# Have to reintroduce ENV vars from builder image
ENV PATH /go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
COPY GNUmakefile VERSION ./
COPY tools/bin/ldflags ./tools/bin/
# Env vars needed for chainlink build
ADD go.mod go.sum ./
RUN go mod download
# Env vars needed for chainlink build
ARG COMMIT_SHA
ARG ENVIRONMENT
COPY --from=0 /chainlink/evm-contracts/abi ./evm-contracts/abi
COPY --from=0 /chainlink/operator_ui/dist ./operator_ui/dist
COPY core core
COPY packr packr
RUN make chainlink-build
# Final layer: ubuntu with chainlink binary
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y ca-certificates
WORKDIR /root
COPY --from=1 /go/bin/chainlink /usr/local/bin/
EXPOSE 6688
ENTRYPOINT ["chainlink"]
CMD ["local", "node"]