Skip to content

chore: add pprof and graphviz for dfdameon container #433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]
Loading