Skip to content

Commit

Permalink
chore: add pprof and graphviz for dfdameon container (#433)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Apr 29, 2024
1 parent aa11bf9 commit 9d94519
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 18 deletions.
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ members = [
]

[workspace.package]
version = "0.1.42"
version = "0.1.43"
authors = ["The Dragonfly Developers"]
homepage = "https://d7y.io/"
repository = "https://github.com/dragonflyoss/client.git"
Expand All @@ -22,13 +22,13 @@ readme = "README.md"
edition = "2021"

[workspace.dependencies]
dragonfly-client = { path = "dragonfly-client", version = "0.1.42" }
dragonfly-client-core = { path = "dragonfly-client-core", version = "0.1.42" }
dragonfly-client-config = { path = "dragonfly-client-config", version = "0.1.42" }
dragonfly-client-storage = { path = "dragonfly-client-storage", version = "0.1.42" }
dragonfly-client-backend = { path = "dragonfly-client-backend", version = "0.1.42" }
dragonfly-client-util = { path = "dragonfly-client-util", version = "0.1.42" }
dragonfly-client-init = { path = "dragonfly-client-init", version = "0.1.42" }
dragonfly-client = { path = "dragonfly-client", version = "0.1.43" }
dragonfly-client-core = { path = "dragonfly-client-core", version = "0.1.43" }
dragonfly-client-config = { path = "dragonfly-client-config", version = "0.1.43" }
dragonfly-client-storage = { path = "dragonfly-client-storage", version = "0.1.43" }
dragonfly-client-backend = { path = "dragonfly-client-backend", version = "0.1.43" }
dragonfly-client-util = { path = "dragonfly-client-util", version = "0.1.43" }
dragonfly-client-init = { path = "dragonfly-client-init", version = "0.1.43" }
thiserror = "1.0"
dragonfly-api = "2.0.110"
reqwest = { version = "0.11.27", features = ["stream", "native-tls", "default-tls", "rustls-tls"] }
Expand Down
10 changes: 8 additions & 2 deletions dragonfly-client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM rust:1.75.0 as builder

WORKDIR /app/client

RUN apt-get update && apt-get install -y openssl libclang-dev pkg-config protobuf-compiler

WORKDIR /app/client
COPY Cargo.toml ./
COPY Cargo.lock ./

Expand Down Expand Up @@ -45,16 +46,21 @@ RUN if [ "$(uname -m)" = "ppc64le" ]; then \
fi && \
chmod +x /bin/grpc_health_probe

FROM golang:1.21.1-alpine3.17 as pprof

RUN go install github.com/google/pprof@latest

FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y --no-install-recommends wget curl \
bash-completion procps apache2-utils ca-certificates binutils bpfcc-tools \
dnsutils git iputils-ping jq vim linux-perf \
dnsutils git iputils-ping jq vim linux-perf graphviz \
&& rm -rf /var/lib/apt/lists/*

COPY --from=builder /app/client/target/release/dfget /usr/local/bin/dfget
COPY --from=builder /app/client/target/release/dfdaemon /usr/local/bin/dfdaemon
COPY --from=builder /app/client/target/release/dfstore /usr/local/bin/dfstore
COPY --from=health /bin/grpc_health_probe /bin/grpc_health_probe
COPY --from=pprof /go/bin/pprof /bin/pprof

ENTRYPOINT ["/usr/local/bin/dfdaemon"]

0 comments on commit 9d94519

Please sign in to comment.