minor changes
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Hamcha 2023-11-25 14:42:36 +01:00
parent 279da28323
commit 1a4ae07e6b
5 changed files with 14 additions and 20 deletions

3
.cargo/config.toml Normal file
View file

@ -0,0 +1,3 @@
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-Clink-arg=-fuse-ld=mold"]

12
Cargo.lock generated
View file

@ -1317,7 +1317,6 @@ dependencies = [
"thiserror",
"time",
"tokio",
"tokio-stream",
"tracing",
"tracing-subscriber",
]
@ -1483,17 +1482,6 @@ dependencies = [
"syn",
]
[[package]]
name = "tokio-stream"
version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842"
dependencies = [
"futures-core",
"pin-project-lite",
"tokio",
]
[[package]]
name = "tokio-util"
version = "0.7.10"

View file

@ -23,6 +23,5 @@ tempfile = "3"
thiserror = "1"
time = { version = "0.3", features = ["serde"] }
tokio = { version = "1", features = ["full"] }
tokio-stream = "0.1"
tracing = "0.1"
tracing-subscriber = "0.3"

View file

@ -1,13 +1,16 @@
FROM public.ecr.aws/docker/library/rust:1-alpine as builder
RUN rustup default stable
RUN apk add --no-cache musl-dev openssl-dev openssl-libs-static pkgconf git
RUN apk add --no-cache musl-dev openssl-dev openssl-libs-static pkgconf git mold clang
# Set `SYSROOT` to a dummy path (default is /usr) because pkg-config-rs *always*
# links those located in that path dynamically but we want static linking, c.f.
# https://github.com/rust-lang/pkg-config-rs/blob/54325785816695df031cef3b26b6a9a203bbc01b/src/lib.rs#L613
ENV SYSROOT=/dummy
# Compilation speedup
ENV CARGO_INCREMENTAL=0
WORKDIR /wd
COPY . /wd
RUN cargo build --release --target=x86_64-unknown-linux-musl

View file

@ -54,16 +54,17 @@ async fn main() -> Result<()> {
_ = dotenvy::dotenv();
tracing_subscriber::fmt::init();
// Try to connect to docker server
let docker = Docker::connect_with_local_defaults()?;
// Ping to make sure it works
let version = docker.version().await?;
tracing::info!("docker version: {}", version.version.unwrap());
// Parse args
let args = Args::parse();
tracing::info!("listening on {}", &args.bind);
// Try to connect to docker server
let docker = Docker::connect_with_local_defaults()?;
// Ping to make sure it works
let version = docker.version().await?;
tracing::info!("docker version: {}", version.version.unwrap());
let (author_name, author_email) = parse_author(&args.git_author)?;
let gitconfig = GitConfig {
author_name,