-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
78 lines (68 loc) · 3.46 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
FROM golang:1.17-stretch AS build
ARG JAEGER_VERSION main
ARG JAEGER_CLICKHOUSE_VERSION main
ENV GOBUILD "go build -ldflags '-linkmode=external' -trimpath"
RUN set -eux \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
binutils \
ca-certificates \
curl \
git \
make
RUN set -eux \
&& git clone --depth=1 --single-branch -b ${JAEGER_VERSION} \
https://github.com/jaegertracing/jaeger.git \
/go/src/github.com/jaegertracing/jaeger \
&& cd /go/src/github.com/jaegertracing/jaeger \
#
&& git submodule update --init --recursive \
&& curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n \
&& bash n lts \
&& curl -o- -L https://yarnpkg.com/install.sh | bash \
&& export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" \
&& export GOOS="$(go env GOOS)" \
&& go install github.com/mjibson/[email protected] \
&& make build-ui \
#
&& make -e build-platform-binaries \
&& strip \
cmd/all-in-one/all-in-one-linux-amd64 \
cmd/agent/agent-linux-amd64 \
cmd/anonymizer/anonymizer-linux-amd64 \
cmd/collector/collector-linux-amd64 \
cmd/ingester/ingester-linux-amd64 \
cmd/query/query-linux-amd64 \
cmd/tracegen/tracegen-linux-amd64
RUN set -eux \
&& git clone --depth=1 --single-branch -b ${JAEGER_CLICKHOUSE_VERSION} \
https://github.com/jaegertracing/jaeger-clickhouse.git \
/go/src/github.com/jaegertracing/jaeger-clickhouse \
&& cd /go/src/github.com/jaegertracing/jaeger-clickhouse \
&& make -e build \
&& strip \
jaeger-clickhouse-linux-amd64
FROM debian:stretch-slim
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=build /go/src/github.com/jaegertracing/jaeger/cmd/agent/agent-linux-amd64 /opt/bin/jaeger-agent
COPY --from=build /go/src/github.com/jaegertracing/jaeger/cmd/all-in-one/all-in-one-linux-amd64 /opt/bin/jaeger
COPY --from=build /go/src/github.com/jaegertracing/jaeger/cmd/anonymizer/anonymizer-linux-amd64 /opt/bin/anonymizer
COPY --from=build /go/src/github.com/jaegertracing/jaeger/cmd/collector/collector-linux-amd64 /opt/bin/jaeger-collector
COPY --from=build /go/src/github.com/jaegertracing/jaeger/cmd/ingester/ingester-linux-amd64 /opt/bin/jaeger-ingester
COPY --from=build /go/src/github.com/jaegertracing/jaeger/cmd/query/query-linux-amd64 /opt/bin/jaeger-query
COPY --from=build /go/src/github.com/jaegertracing/jaeger/cmd/tracegen/tracegen-linux-amd64 /opt/bin/tracegen
COPY --from=build /go/src/github.com/jaegertracing/jaeger/jaeger-ui/packages/jaeger-ui/build /opt/jaeger/ui
COPY --from=build /go/src/github.com/jaegertracing/jaeger-clickhouse/jaeger-ui.json /opt/jaeger/jaeger-ui.json
COPY --from=build /go/src/github.com/jaegertracing/jaeger-clickhouse/jaeger-clickhouse-linux-amd64 /opt/jaeger/plugin/jaeger-clickhouse
COPY --from=build /go/src/github.com/jaegertracing/jaeger-clickhouse/config.yaml /opt/jaeger/config.yaml
COPY --from=build /go/src/github.com/jaegertracing/jaeger-clickhouse/sqlscripts /opt/jaeger/sqlscripts
ENV SPAN_STORAGE_TYPE grpc-plugin
WORKDIR /opt/jaeger
EXPOSE 6831/udp
EXPOSE 6832/udp
EXPOSE 5778
EXPOSE 14268
EXPOSE 14250
EXPOSE 16686
VOLUME ["/tmp"]
CMD ["/opt/bin/jaeger", "--query.static-files", "ui", "--query.ui-config", "jaeger-ui.json", "--grpc-storage-plugin.binary", "plugin/jaeger-clickhouse", "--grpc-storage-plugin.configuration-file", "config.yaml"]