forked from livepeer/catalyst
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
62 lines (37 loc) · 1.21 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
ARG GIT_VERSION=unknown
ARG BUILD_TARGET
FROM golang:1-bullseye as gobuild
WORKDIR /src
ADD go.mod go.sum ./
RUN go mod download
ADD Makefile manifest.yaml ./
ADD cmd/downloader/ cmd/downloader/
RUN make download
ADD . .
ARG GIT_VERSION
ENV GIT_VERSION="${GIT_VERSION}"
RUN make livepeer-log livepeer-catalyst-node
FROM ubuntu:20.04 as catalyst-full-build
WORKDIR /opt/bin
COPY --from=gobuild /src/bin/ /opt/bin/
FROM ubuntu:20.04 as catalyst-stripped-build
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /opt/bin
RUN apt update && apt install -yqq build-essential
COPY --from=gobuild /src/bin/ /opt/bin/
RUN strip -s /opt/bin/*
FROM catalyst-${BUILD_TARGET}-build as catalyst-build
FROM ubuntu:20.04 AS catalyst
ENV DEBIAN_FRONTEND=noninteractive
LABEL maintainer="Amritanshu Varshney <[email protected]>"
ARG BUILD_TARGET
RUN apt update && apt install -yqq \
ca-certificates \
musl \
python3 \
vim lsof curl wget jq dnsutils iputils-ping serf \
"$(if [ "$BUILD_TARGET" != "stripped" ]; then echo "gdb"; fi)" \
&& rm -rf /var/lib/apt/lists/*
COPY --from=catalyst-build /opt/bin/ /usr/local/bin/
EXPOSE 1935 4242 8080 8889/udp
CMD ["/usr/local/bin/MistController", "-c", "/etc/livepeer/catalyst.json"]