mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-18 16:02:10 +00:00
fix: add DOTNET_ROOT env variable (#4921)
This commit is contained in:
@@ -48,6 +48,8 @@ const NSJAIL_CONFIG_RUN_CSHARP_CONTENT: &str = include_str!("../nsjail/run.cshar
|
||||
#[cfg(feature = "csharp")]
|
||||
lazy_static::lazy_static! {
|
||||
static ref HOME_DIR: String = std::env::var("HOME").expect("Could not find the HOME environment variable");
|
||||
static ref DOTNET_ROOT: String = std::env::var("DOTNET_ROOT").expect("Could not find the DOTNET_ROOT environment variable");
|
||||
|
||||
}
|
||||
|
||||
#[cfg(feature = "csharp")]
|
||||
@@ -281,6 +283,7 @@ async fn build_cs_proj(
|
||||
.env("HOME", HOME_ENV.as_str())
|
||||
.env("DOTNET_CLI_TELEMETRY_OPTOUT", "true")
|
||||
.env("DOTNET_NOLOGO", "true")
|
||||
.env("DOTNET_ROOT", DOTNET_ROOT.as_str())
|
||||
.args(vec![
|
||||
"publish",
|
||||
"--configuration",
|
||||
@@ -493,6 +496,7 @@ pub async fn handle_csharp_job(
|
||||
.env("BASE_INTERNAL_URL", base_internal_url)
|
||||
.env("DOTNET_CLI_TELEMETRY_OPTOUT", "true")
|
||||
.env("DOTNET_NOLOGO", "true")
|
||||
.env("DOTNET_ROOT", DOTNET_ROOT.as_str())
|
||||
.args(vec!["--config", "run.config.proto", "--", "/tmp/main"])
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::piped());
|
||||
@@ -509,6 +513,7 @@ pub async fn handle_csharp_job(
|
||||
.env("TZ", TZ_ENV.as_str())
|
||||
.env("DOTNET_CLI_TELEMETRY_OPTOUT", "true")
|
||||
.env("DOTNET_NOLOGO", "true")
|
||||
.env("DOTNET_ROOT", DOTNET_ROOT.as_str())
|
||||
.env("BASE_INTERNAL_URL", base_internal_url)
|
||||
.env("HOME", HOME_ENV.as_str())
|
||||
.stdout(Stdio::piped())
|
||||
|
||||
@@ -7,3 +7,4 @@ RUN pip3 install ansible
|
||||
|
||||
COPY --from=bitnami/dotnet-sdk:9.0.101-debian-12-r0 /opt/bitnami/dotnet-sdk /opt/dotnet-sdk
|
||||
RUN ln -s /opt/dotnet-sdk/bin/dotnet /usr/bin/dotnet
|
||||
ENV DOTNET_ROOT="/opt/dotnet-sdk/bin"
|
||||
|
||||
@@ -7,3 +7,4 @@ RUN pip3 install ansible
|
||||
|
||||
COPY --from=bitnami/dotnet-sdk:9.0.101-debian-12-r0 /opt/bitnami/dotnet-sdk /opt/dotnet-sdk
|
||||
RUN ln -s /opt/dotnet-sdk/bin/dotnet /usr/bin/dotnet
|
||||
ENV DOTNET_ROOT="/opt/dotnet-sdk/bin"
|
||||
|
||||
@@ -32,5 +32,6 @@ RUN pip3 install ansible
|
||||
|
||||
COPY --from=bitnami/dotnet-sdk:9.0.101-debian-12-r0 /opt/bitnami/dotnet-sdk /opt/dotnet-sdk
|
||||
RUN ln -s /opt/dotnet-sdk/bin/dotnet /usr/bin/dotnet
|
||||
ENV DOTNET_ROOT="/opt/dotnet-sdk/bin"
|
||||
|
||||
COPY --from=nsjail /nsjail/nsjail /bin/nsjail
|
||||
|
||||
Reference in New Issue
Block a user