update dockerfiles

This commit is contained in:
pyranota
2025-04-11 15:10:53 +02:00
parent cb49ae5458
commit 99fcacb2e6
4 changed files with 8 additions and 4 deletions
+5 -1
View File
@@ -39,6 +39,8 @@ lazy_static::lazy_static! {
static ref CARGO_PATH: String = std::env::var("CARGO_PATH").unwrap_or_else(|_| format!("{}/bin/cargo", CARGO_HOME.as_str()));
static ref CARGO_SWEEP_PATH: String = std::env::var("CARGO_SWEEP_PATH").unwrap_or_else(|_| format!("{}/bin/cargo-sweep", CARGO_HOME.as_str()));
static ref SWEEP_MAXSIZE: String = std::env::var("CARGO_SWEEP_MAXSIZE").unwrap_or("5GB".to_owned());
static ref NO_SHARED_BUILD_DIR: bool = var("RUST_NO_SHARED_BUILD_DIR").ok().map(|flag| flag == "true").unwrap_or(false);
}
#[cfg(windows)]
@@ -200,7 +202,9 @@ pub async fn build_rust_crate(
path.replace('/', "."),
&job.created_by
);
if let Err(e) = create_dir_all(&t).await {
if *NO_SHARED_BUILD_DIR {
None
} else if let Err(e) = create_dir_all(&t).await {
tracing::warn!("Could not create shared target dir. Incremental compilation is not possible.\ne: {e}");
None
} else {
+1 -1
View File
@@ -3,7 +3,7 @@ FROM ghcr.io/windmill-labs/windmill:dev
# Rust
COPY --from=rust:1.81.0 /usr/local/cargo /usr/local/cargo
COPY --from=rust:1.81.0 /usr/local/rustup /usr/local/rustup
RUN cargo install cargo-sweep
RUN /usr/local/cargo/bin/cargo install cargo-sweep --version ^0.7
# Ansible
RUN uv tool install ansible && [ -d "$(uv tool dir)/ansible/bin/" ] && find "$(uv tool dir)/ansible/bin/" -mindepth 1 -maxdepth 1 -type f -executable -regextype posix-extended -regex '^((.+/)?)[^.]+' -print0 | xargs -0 ln -s -t "$UV_TOOL_BIN_DIR/" || true
+1 -1
View File
@@ -22,7 +22,7 @@ FROM ghcr.io/windmill-labs/windmill-ee:dev
# Rust
COPY --from=rust:1.81.0 /usr/local/cargo /usr/local/cargo
COPY --from=rust:1.81.0 /usr/local/rustup /usr/local/rustup
RUN cargo install cargo-sweep
RUN /usr/local/cargo/bin/cargo install cargo-sweep --version ^0.7
# Ansible
RUN uv tool install ansible && [ -d "$(uv tool dir)/ansible/bin/" ] && find "$(uv tool dir)/ansible/bin/" -mindepth 1 -maxdepth 1 -type f -executable -regextype posix-extended -regex '^((.+/)?)[^.]+' -print0 | xargs -0 ln -s -t "$UV_TOOL_BIN_DIR/" || true
+1 -1
View File
@@ -45,7 +45,7 @@ RUN apt-get update && apt-get install -y libprotobuf-dev libnl-route-3-dev
# Rust
COPY --from=rust:1.80.1 /usr/local/cargo /usr/local/cargo
COPY --from=rust:1.80.1 /usr/local/rustup /usr/local/rustup
RUN cargo install cargo-sweep
RUN /usr/local/cargo/bin/cargo install cargo-sweep --version ^0.7
# Ansible
RUN uv tool install ansible && [ -d "$(uv tool dir)/ansible/bin/" ] && find "$(uv tool dir)/ansible/bin/" -mindepth 1 -maxdepth 1 -type f -executable -regextype posix-extended -regex '^((.+/)?)[^.]+' -print0 | xargs -0 ln -s -t "$UV_TOOL_BIN_DIR/" || true