Skip to content

Commit

Permalink
feat: change BASE_IMAGE in Dockerfile and remove useless logs (#190)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Jan 3, 2024
1 parent afab1ac commit dbba676
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dragonfly-client"
version = "0.1.4"
version = "0.1.5"
authors = ["The Dragonfly Developers"]
homepage = "https://d7y.io/"
repository = "https://github.com/dragonflyoss/client.git"
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG BASE_IMAGE=alpine:3.17
ARG BASE_IMAGE=rust

FROM rust as builder
FROM ${BASE_IMAGE} as builder

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

Expand All @@ -9,7 +9,7 @@ COPY Cargo.toml ./
COPY src/ src/
RUN cargo build --release

FROM ${BASE_IMAGE} as health
FROM alpine:3.17 as health

ENV GRPC_HEALTH_PROBE_VERSION v0.4.24

Expand All @@ -29,4 +29,4 @@ 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

ENTRYPOINT ["dfdaemon"]
ENTRYPOINT ["/usr/local/bin/dfdaemon"]
9 changes: 4 additions & 5 deletions src/bin/dfdaemon/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,11 @@ async fn main() -> Result<(), anyhow::Error> {
let args = Args::parse();

// Load config.
let config = dfdaemon::Config::load(&args.config)?;
let config = dfdaemon::Config::load(&args.config).map_err(|err| {
error!("load config failed: {}", err);
err
})?;
let config = Arc::new(config);
println!(
"socket path: {:?}",
config.download.server.socket_path.clone()
);

// Initialize tracing.
let _guards = init_tracing(
Expand Down

0 comments on commit dbba676

Please sign in to comment.