FROM ubuntu:jammy-20260210.1 as builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
ca-certificates \
curl \
git \
cmake \
&& rm -rf /var/lib/apt/lists/*
# Install Rust toolchain using rustup
RUN curl --proto 'https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /workspace
COPY . .
# Build the entire workspace in release mode with locked Cargo.lock for reproducible builds
RUN cargo build --workspace --locked --release
# Final runtime image
FROM ubuntu:jammy-20260210.1
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libssl3 \
zlib1g \
libsqlite3-0 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /deno
# Copy the built binary from the builder stage
COPY --from=builder /workspace/target/release/deno /deno/deno
RUN chmod +x /deno/deno
CMD ["/deno/deno"]
# Ignore git and cargo caches and node_modules to speed up context .git node_modules target Cargo.lock .DS_Store *.log **/__pycache__/
Failing step - [builder 6/6] RUN cargo build --workspace --locked --release Exact error and exit code - error: the lock file /workspace/Cargo.lock needs to be updated but --locked was passed to prevent this - If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead. - Exit code: 101 Missing packages/files mentioned - Cargo.lock file: /workspace/Cargo.lock needs to be updated (lockfile out-of-date) Version mismatch / related details - Rust toolchain installed during build: - Rust installed: stable X.Y (rustc 1.94.0 (4a4ef493e 2026-03-02)) - The log shows: latest update on 2026-03-05 for version 1.94.0 - Cargo/Rust channel mismatch observed: - The cargo step logs: syncing channel updates for 1.92.0-x86_64-unknown-linux-gnu; latest update for version 1.92.0 (ded5c06cf 2025-12-08) - This indicates a lockfile generated for an older channel (1.92.0) while the toolchain installed is 1.94.0 Notes - The error arises from using --locked with a Cargo.lock that is out-of-date relative to the workspace’s manifest; network access would typically update the lock, or removing --locked (and/or using --offline) would allow regeneration.
FROM ubuntu:jammy-20260210.1 as builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
ca-certificates \
curl \
git \
cmake \
&& rm -rf /var/lib/apt/lists/*
# Install Rust toolchain using rustup
RUN curl --proto 'https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /workspace
COPY . .
# Build the entire workspace in release mode
RUN cargo build --workspace --release
# Final runtime image
FROM ubuntu:jammy-20260210.1
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libssl3 \
zlib1g \
libsqlite3-0 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /deno
# Copy the built binary from the builder stage
COPY --from=builder /workspace/target/release/deno /deno/deno
RUN chmod +x /deno/deno
CMD ["/deno/deno"]
- Exact error messages and exit code - error[E0050]: method `post_task` has 2 parameters but the declaration in trait `post_task` has 3 - error[E0050]: method `post_non_nestable_task` has 2 parameters but the declaration in trait `post_non_nestable_task` has 3 - error[E0050]: method `post_delayed_task` has 3 parameters but the declaration in trait `post_delayed_task` has 4 - error[E0050]: method `post_non_nestable_delayed_task` has 3 parameters but the declaration in trait `post_non_nestable_delayed_task` has 4 - error[E0050]: method `post_idle_task` has 2 parameters but the declaration in trait `post_idle_task` has 3 - error: could not compile `deno_core` (lib) due to 5 previous errors - exit code: 101 - Failing command/step - [builder 6/6] RUN cargo build --workspace --release - Missing packages or files mentioned - None reported as missing; errors are due to trait method signature mismatches in deno_core compilation. - Version mismatch info - The errors indicate a signature mismatch between trait declarations and implementations (E0050) for several post_* tasks, suggesting a version mismatch or incompatible changes between deno_core and the surrounding crates. This is evidenced by multiple E0050 errors during deno_core compilation.
FROM ubuntu:jammy-20260210.1 as builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
ca-certificates \
curl \
git \
cmake \
&& rm -rf /var/lib/apt/lists/*
# Install Rust toolchain using rustup (pin to a compatible older toolchain)
RUN curl --proto 'https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.92.0
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /workspace
COPY . .
# Build the entire workspace in release mode
RUN cargo build --workspace --release
# Final runtime image
FROM ubuntu:jammy-20260210.1
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libssl3 \
zlib1g \
libsqlite3-0 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /deno
# Copy the built binary from the builder stage
COPY --from=builder /workspace/target/release/deno /deno/deno
RUN chmod +x /deno/deno
CMD ["/deno/deno"]
Build failed summary - VerifyBuild status: build_failed - Command: cargo build --workspace --release - Exit code: 101 - Final image: ubuntu:jammy-20260210.1 (tag note: verify exists or use ubuntu:22.04 for reproducibility) - Toolchain: Rust 1.92.0 pinned in image - Docker issue: no .dockerignore contents shown Key errors (5 total, blocking deno_core lib) - File: libs/core/runtime/setup.rs - 1) post_task - trait expects: fn(&Self, *mut c_void, Task) - impl has: fn post_task(&self, isolate_ptr: *mut c_void) - mismatch: 2 vs 3 parameters - 2) post_non_nestable_task - trait expects: fn(&Self, *mut c_void, Task) - impl has: fn post_non_nestable_task(&self, isolate_ptr: *mut c_void) - mismatch: 2 vs 3 parameters - 3) post_delayed_task - trait expects: fn(&Self, *mut c_void, Task, f64) - impl has: fn post_delayed_task(&self, isolate_ptr: *mut c_void, delay_in_seconds: f64) - mismatch: 4 vs 3 parameters - 4) post_non_nestable_delayed_task - trait expects: fn(&Self, *mut c_void, Task, f64) - impl has: fn post_non_nestable_delayed_task(&self, isolate_ptr: *mut c_void, delay_in_seconds: f64) - mismatch: 4 vs 3 parameters - 5) post_idle_task - trait expects: fn(&Self, *mut c_void, IdleTask) - impl has: fn post_idle_task(&self, isolate_ptr: *mut c_void) - mismatch: 3 vs 2 parameters Context - The build progresses through many crates, but deno_core (lib) cannot compile due to the above API/signature mismatches. Cargo exits with code 101. - Missing packages/files: none reported; issues are API/signature mismatches between trait declarations and implementations. - Version mismatch notes - Rust toolchain: default 1.92.0 - API incompatibility rather than missing files - Crate resolution hints show differing versions (e.g., aes v0.8.3 vs v0.8.4) indicating dependency version shifts Actionable next steps - Align runtime trait signatures and implementations in libs/core/runtime/setup.rs to have matching parameter counts (add missing parameters to impls to match trait: Task, f64, IdleTask as applicable). - Ensure deno_core version is compatible with the runtime trait definitions, or adjust code to match the crate’s API. - Consider updating the Rust toolchain in the image to a version compatible with the crate set. - Verify the base image tag (ubuntu:jammy-20260210.1) exists and provides compatible libraries; if reproducibility is a concern, switch to a standard base (e.g., ubuntu:22.04). - Add a proper .dockerignore to avoid shipping large/sensitive files in build context.
FROM ubuntu:jammy-20260210.1 as builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
ca-certificates \
curl \
git \
cmake \
&& rm -rf /var/lib/apt/lists/*
# Install Rust toolchain via rustup and pin a compatible version
RUN curl --proto 'https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Install a specific Rust toolchain version to match the workspace expectations
RUN rustup toolchain install 1.94.0 \
&& rustup default 1.94.0
WORKDIR /workspace
COPY . .
# Build the entire workspace in release mode (do not use --locked to allow lockfile updates if needed)
RUN cargo build --workspace --release
# Final runtime image
FROM ubuntu:jammy-20260210.1
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libssl3 \
zlib1g \
libsqlite3-0 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 denom
WORKDIR /deno
# Copy the built binary from the builder stage
COPY --from=builder /workspace/target/release/deno /deno/deno
RUN chmod +x /deno/deno
USER denom
CMD ["/deno/deno"]
Build result: - Status: build_failed - Failing command: [builder 7/7] RUN cargo build --workspace --release - Exit code: 101 Exact errors (highlights): - error[E0050]: method `post_task` has 2 parameters but the declaration in trait `post_task` has 3 libs/core/runtime/setup.rs:196:16 Note: trait signature is `fn(&Self, *mut c_void, Task)` - error[E0050]: method `post_non_nestable_task` has 2 parameters but the declaration in trait `post_non_nestable_task` has 3 libs/core/runtime/setup.rs:200:29 Note: trait signature is `fn(&Self, *mut c_void, Task)` - error[E0050]: method `post_delayed_task` has 3 parameters but the declaration in trait `post_delayed_task` has 4 libs/core/runtime/setup.rs:204:24 Note: trait signature is `fn(&Self, *mut c_void, Task, f64)` - error[E0050]: method `post_non_nestable_delayed_task` has 3 parameters but the declaration in trait `post_non_nestable_delayed_task` has 4 libs/core/runtime/setup.rs:209 Note: trait signature is `fn(&Self, *mut c_void, Task, f64)` - error[E0050]: method `post_idle_task` has 2 parameters but the declaration in trait `post_idle_task` has 3 libs/core/runtime/setup.rs:216:21 Note: trait signature is `fn(&Self, *mut c_void, IdleTask)` - Summary: could not compile `deno_core` (lib) due to 5 previous errors (rustc E0050) Version / toolchain context: - Rust toolchains observed: - 1.94.0 installed and used as default - Workspace wired to use 1.92.0 channel (syncing updates for 1.92.0-x86_64-unknown-linux-gnu) - This indicates a toolchain/version mismatch: 1.94.0 installed but build proceeds with 1.92.0, contributing to API/signature mismatches like E0050. Missing packages/files: - None explicitly missing. Issue is a compile-time API mismatch in deno_core during cargo build. Additional context: - The failure occurs during Rust compilation of the workspace, blocking the final image build. Recommended next steps (actionable): - Align toolchains across the workspace: - Option A: Install and use the 1.92.0 toolchain consistently (e.g., rustup override set 1.92.0 in the repo, or run cargo +1.92.0 build). - Option B: Update code to be compatible with 1.94.0 if desired (adjust the trait vs impl signatures in libs/core/runtime/setup.rs). - If proceeding with 1.92.0, ensure the environment uses that toolchain for cargo builds: - rustup override set 1.92.0 - cargo +1.92.0 build --workspace --release - If adjusting code for compatibility, modify the signatures in libs/core/runtime/setup.rs to match the trait definitions: - post_task(self, isolate_ptr: *mut c_void, ... Task) - post_non_nestable_task(self, isolate_ptr: *mut c_void, ... Task) - post_delayed_task(self, isolate_ptr: *mut c_void, delay_in_seconds: f64, ... Task) - post_non_nestable_delayed_task(self, isolate_ptr: *mut c_void, delay_in_seconds: f64, ... Task) - post_idle_task(self, isolate_ptr: *mut c_void, ... IdleTask) - After alignment, re-run the build and check for remaining errors. - For more details on E0050, run: rustc --explain E0050.
FROM ubuntu:22.04 as builder
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies and tooling
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
cmake \
ca-certificates \
curl \
git \
unzip && \
rm -rf /var/lib/apt/lists/*
# Install Rust toolchain (stable)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Build the workspace from source
WORKDIR /deno
COPY . .
RUN cargo build --workspace --locked --release
############################################################
# Runtime image
FROM ubuntu:22.04 as runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
openssl \
zlib1g \
libsqlite3-0 && \
rm -rf /var/lib/apt/lists/*
# Copy the built binary from the builder stage
COPY --from=builder /deno/cli/target/release/deno /usr/local/bin/deno
RUN chmod +x /usr/local/bin/deno
ENTRYPOINT ["/usr/local/bin/deno"]
node_modules target **/*.rs.bk Cargo.lock .DS_Store .git .gitignore
Error summary - Exact error message and exit code: - error: the lock file /deno/Cargo.lock needs to be updated but --locked was passed to prevent this - If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead. - Exit code: 101 - Failing command/step: - [builder 6/6] RUN cargo build --workspace --locked --release - Missing packages or files mentioned: - None reported. The failure is due to Cargo.lock being out of date while using --locked, not a missing system package or file. - Version mismatch / related notes: - The log shows toolchain activity for 1.92.0-x86_64-unknown-linux-gnu (syncing updates for 1.92.0) and “latest update on 2025-12-11 for version 1.92.0.” - However, rustup/installation step shows Rust installed: stable 1.94.0 (1.94.0 (4a4ef493e 2026-03-02)). - This indicates a potential version mismatch between the build toolchain (1.92.0 in use for the build) and the installed Rust toolchain (1.94.0). Notes and quick fixes - The failure occurs because Cargo.lock is not in sync with Cargo.toml under --locked. To proceed, you can: - Update the lock file: cargo update - Or rebuild without --locked to allow Cargo to update Cargo.lock (cargo build --workspace --release) - If you want to avoid network access, you could try cargo build --workspace --offline after updating the lock file locally.
FROM ubuntu:22.04 as builder
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies and tooling
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
cmake \
ca-certificates \
curl \
git \
unzip && \
rm -rf /var/lib/apt/lists/*
# Install Rust toolchain (stable)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Build the workspace from source
WORKDIR /deno
COPY . .
RUN cargo update --workspace
RUN cargo build --workspace --locked --release
############################################################
# Runtime image
FROM ubuntu:22.04 as runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
openssl \
zlib1g \
libsqlite3-0 && \
rm -rf /var/lib/apt/lists/*
# Copy the built binary from the builder stage
COPY --from=builder /deno/cli/target/release/deno /usr/local/bin/deno
RUN chmod +x /usr/local/bin/deno
ENTRYPOINT ["/usr/local/bin/deno"]
Status: build_failed Command: cargo build --workspace --locked --release Failing step: Dockerfile, builder step 7/7 Location: Dockerfile: [builder 7/7] RUN cargo build --workspace --locked --release Summary of errors - libs/core/runtime/setup.rs:196:16 - error[E0050]: method post_task has 2 parameters but the trait declares 3 - trait signature: fn(&Self, *mut c_void, Task) - libs/core/runtime/setup.rs:200:29 - error[E0050]: method post_non_nestable_task has 2 parameters but the trait declares 3 - trait signature: fn(&Self, *mut c_void, Task) - libs/core/runtime/setup.rs:204:24 - error[E0050]: method post_delayed_task has 3 parameters but the trait declares 4 - trait signature: fn(&Self, *mut c_void, Task, f64) - libs/core/runtime/setup.rs:209:5 - error[E0050]: method post_non_nestable_delayed_task has 3 parameters but the trait declares 4 - trait signature: fn(&Self, *mut c_void, Task, f64) - libs/core/runtime/setup.rs:216:21 - error[E0050]: method post_idle_task has 2 parameters but the trait declares 3 - trait signature: fn(&Self, *mut c_void, IdleTask) Additional context - Could not compile deno_core (lib) due to these 5 errors; exit code 101. - Build shows: “Docker shows exit: 101 for the cargo build step” - The failing step is the cargo build in builder step 7/7: [builder 7/7] RUN cargo build --workspace --locked --release - Version/environment notes: - rustc 1.94.0 (4a4ef493e 2026-03-02) - Toolchain latest update on 2026-03-05 for version 1.94.0 (4a4ef493e 2026-03-02) - Issue: newer toolchain API/signature changes cause trait-method mismatches in deno_core Notes - The mismatch is in API/signature of trait methods implemented in deno_core; not missing files. - The build failure is the root cause of the overall failure; the runtime COPY path concern in VerifyBuild remains separate unless the binary path changes. Actionable items (next steps) - Align deno_core implementations with the trait signatures (update methods to accept the correct number of parameters) or revert/downgrade toolchain to match crate’s expected API. - If workspace layout or binary name changes, adjust the COPY in the runtime stage to point to the actual path (the expected path given: /deno/cli/target/release/deno).
FROM ubuntu:22.04 as builder
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies and tooling
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
cmake \
ca-certificates \
curl \
git \
unzip \
ca-certificates \
xz-utils && \
rm -rf /var/lib/apt/lists/*
# Install Rust toolchain (stable) pinned to a compatible version
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.93.0
ENV PATH="/root/.cargo/bin:${PATH}"
# Build the workspace from source
WORKDIR /deno
COPY . .
RUN cargo update --workspace
RUN cargo build --release --workspace
############################################################
# Runtime image
FROM ubuntu:22.04 as runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
openssl \
zlib1g \
libsqlite3-0 && \
rm -rf /var/lib/apt/lists/*
# Copy the built binary from the builder stage
COPY --from=builder /deno/cli/target/release/deno /usr/local/bin/deno
RUN chmod +x /usr/local/bin/deno
ENTRYPOINT ["/usr/local/bin/deno"]
Status and root cause - VerifyBuild: build_failed - Failing step: RUN cargo build --release --workspace (builder 7/7) - Exit code: 101 - Toolchain: Rust 1.93.0 (x86_64-unknown-linux-gnu) via rustup; Rust up to date as of 2026-01-22 - Warnings: Dockerfile casing warnings (From vs as) but not the root cause - Core issue: API/trait signature mismatch in deno_core vs host code (crates-version/API drift) Exact errors (preserved messages) - 1) libs/core/runtime/setup.rs:196:16 error[E0050]: method `post_task` has 2 parameters but the declaration in trait `post_task` has 3 Implemented: fn post_task(&self, isolate_ptr: *mut c_void) Trait: fn(&Self, *mut c_void, Task) - 2) libs/core/runtime/setup.rs:200:29 error[E0050]: method `post_non_nestable_task` has 2 parameters but the declaration in trait `post_non_nestable_task` has 3 Implemented: fn post_non_nestable_task(&self, isolate_ptr: *mut c_void) Trait: fn(&Self, *mut c_void, Task) - 3) libs/core/runtime/setup.rs:204:24 error[E0050]: method `post_delayed_task` has 3 parameters but the declaration in trait `post_delayed_task` has 4 Implemented: fn post_delayed_task(&self, isolate_ptr: *mut c_void, delay_in_seconds: f64) Trait: fn(&Self, *mut c_void, Task, f64) - 4) libs/core/runtime/setup.rs:209-211 error[E0050]: method `post_non_nestable_delayed_task` has 3 parameters but the declaration in trait `post_non_nestable_delayed_task` has 4 Implemented: (self, isolate_ptr, delay_in_seconds: f64) Trait: fn(&Self, *mut c_void, Task, f64) - 5) libs/core/runtime/setup.rs:216:21 error[E0050]: method `post_idle_task` has 2 parameters but the declaration in trait `post_idle_task` has 3 Implemented: fn post_idle_task(&self, isolate_ptr: *mut c_void) Trait: fn(&Self, *mut c_void, IdleTask) Context and implications - These errors indicate a mismatch between the deno_core crate's trait signatures and the host/runtime’s implementations (API/arity drift). - The log notes this as a typical crates-version mismatch between deno_core and the surrounding runtime. Missing packages/files - None indicated as missing; failure is due to code/interface mismatch, not missing files or packages. Recommended actions - Align deno_core version with the consuming code’s expected trait signatures, or adjust dependencies so trait arities match across crates (e.g., upgrade/downgrade deno_core or related crates). - After alignment, re-run cargo build (cargo update -p deno_core if needed) and verify with a known runtime flag (e.g., --version) to validate runtime behavior. Actionable notes - The root cause is a crates-version/API mismatch in deno_core, not a missing package. Ensure compatible deno_core version for the host code.
FROM ubuntu:22.04 as builder
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies and tooling
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
cmake \
ca-certificates \
curl \
git \
unzip \
xz-utils && \
rm -rf /var/lib/apt/lists/*
# Install Rust toolchain (stable) pinned to a compatible version
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.92.0
ENV PATH="/root/.cargo/bin:${PATH}"
# Build the workspace from source
WORKDIR /deno
COPY . .
RUN cargo update --workspace
RUN cargo build --release --workspace
############################################################
# Runtime image
FROM ubuntu:22.04 as runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
openssl \
zlib1g \
libsqlite3-0 && \
rm -rf /var/lib/apt/lists/*
# Copy the built binary from the builder stage
COPY --from=builder /deno/cli/target/release/deno /usr/local/bin/deno
RUN chmod +x /usr/local/bin/deno
ENTRYPOINT ["/usr/local/bin/deno"]
Concerns - Rust toolchain pinned to 1.92.0 may not exist or be available via rustup in all environments; risk of failure if the toolchain cannot be installed. - COPY . . copies the entire repository into the builder context; recommend .dockerignore to avoid shipping large/sensitive files and speed up builds. - No non-root user created in either stage (security concern in some deployments). Build error - Failing step: [builder 7/7] RUN cargo build --release --workspace - Exit code: 101 - error: could not compile deno_core (lib) due to 5 previous errors - Final wrapper: ERROR: failed to build: failed to solve: process "/bin/sh -c cargo build --release --workspace" did not complete successfully: exit code: 101 Exact error messages (E0050signature mismatches) - error[E0050]: method `post_task` has 2 parameters but the declaration in trait `post_task` has 3 libs/core/runtime/setup.rs:196:16 note: `post_task` from trait: `fn(&Self, *mut c_void, Task)` - error[E0050]: method `post_non_nestable_task` has 2 parameters but the declaration in trait `post_non_nestable_task` has 3 libs/core/runtime/setup.rs:200:29 note: `post_non_nestable_task` from trait: `fn(&Self, *mut c_void, Task)` - error[E0050]: method `post_delayed_task` has 3 parameters but the declaration in trait `post_delayed_task` has 4 libs/core/runtime/setup.rs:204:24 note: `post_delayed_task` from trait: `fn(&Self, *mut c_void, Task, f64)` - error[E0050]: method `post_non_nestable_delayed_task` has 3 parameters but the declaration in trait `post_non_nestable_delayed_task` has 4 libs/core/runtime/setup.rs:209:5 note: `post_non_nestable_delayed_task` from trait: `fn(&Self, *mut c_void, Task, f64)` - error[E0050]: method `post_idle_task` has 2 parameters but the declaration in trait `post_idle_task` has 3 libs/core/runtime/setup.rs:216:21 note: `post_idle_task` from trait: `fn(&Self, *mut c_void, IdleTask)` Missing packages/files - None explicitly mentioned; errors indicate a signature/API mismatch between deno_core and dependent crates. Version mismatch / API info - Errors indicate a signature mismatch between trait definitions and implementations (trait expects 3/4 parameters, impl provides 2/3); consistent with a version/API mismatch between deno_core and its dependencies. Notes - The build later shows Rust toolchain activity and building many crates, but failure occurs during deno_core compilation due to the E0050 mismatch. Suggested next steps (actionable) - Align versions: ensure deno_core and its dependent crates share compatible APIs (update cargo.lock or adjust Cargo.toml pins). - Run cargo update -p deno_core or inspect Cargo.lock to resolve mismatched versions. - Verify the toolchain version requirement matches the repo; ensure rustup can fetch 1.92.0 or adjust to a supported version. - Add a .dockerignore to prevent shipping large/sensitive files and speed up builds.
FROM ubuntu:22.04 as builder
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies and tooling
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
cmake \
ca-certificates \
curl \
git \
unzip \
xz-utils \
ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Install Rust toolchain (stable)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Build the workspace from source
WORKDIR /deno
COPY . .
RUN cargo update --workspace
RUN cargo build --workspace --release
############################################################
# Runtime image
FROM ubuntu:22.04 as runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
openssl \
zlib1g \
libsqlite3-0 && \
rm -rf /var/lib/apt/lists/*
# Copy the built binary from the builder stage
COPY --from=builder /deno/cli/target/release/deno /usr/local/bin/deno
RUN chmod +x /usr/local/bin/deno
ENTRYPOINT ["/usr/local/bin/deno"]
Command and context
- Docker build step: RUN cargo build --workspace --release (Dockerfile)
- Exit: 101
- Docker build error: process "/bin/sh -c cargo build --workspace --release" did not complete successfully: exit code: 101
Exact errors (E0050) and locations
- libs/core/runtime/setup.rs:196:16
- error[E0050]: method `post_task` has 2 parameters but the declaration in trait `post_task` has 3
- Impl: fn post_task(&self, isolate_ptr: *mut c_void) { ... }
- Trait: fn(&Self, *mut c_void, Task)
- libs/core/runtime/setup.rs:200:29
- error[E0050]: method `post_non_nestable_task` has 2 parameters but the declaration in trait `post_non_nestable_task` has 3
- Impl: fn post_non_nestable_task(&self, isolate_ptr: *mut c_void) { ... }
- Trait: fn(&Self, *mut c_void, Task)
- libs/core/runtime/setup.rs:204:24
- error[E0050]: method `post_delayed_task` has 3 parameters but the declaration in trait `post_delayed_task` has 4
- Impl: fn post_delayed_task(&self, isolate_ptr: *mut c_void, delay_in_seconds: f64) { ... }
- Trait: fn(&Self, *mut c_void, Task, f64)
- libs/core/runtime/setup.rs:209:5
- error[E0050]: method `post_non_nestable_delayed_task` has 3 parameters but the declaration in trait `post_non_nestable_delayed_task` has 4
- Impl: includes &self, isolate_ptr, delay_in_seconds, ... (details in context)
- Trait: fn(&Self, *mut c_void, Task, f64)
- libs/core/runtime/setup.rs:216:21
- error[E0050]: method `post_idle_task` has 2 parameters but the declaration in trait `post_idle_task` has 3
- Impl: fn post_idle_task(&self, isolate_ptr: *mut c_void) { ... }
- Trait: fn(&Self, *mut c_void, IdleTask)
Result
- could not compile `deno_core` (lib) due to 5 previous errors
- Summary: API signature mismatch between deno_core runtime trait methods and their implementations (trait expects 3 or 4 params; implementations provide 2 or 3)
Root cause and version info
- Root cause: API/signature drift between deno_core runtime trait methods and implementations, indicating a crate version mismatch
- Rust toolchain: stable, around 1.94.0 (Rustup reported via the rustup install step)
- Version detail: mismatched trait-method signatures (expected 3/4 params vs provided 2/3)
Runtime/dependency notes
- Runtime dependencies risk: The runtime image relies on dynamic libraries (openssl, zlib, sqlite3); if the deno binary introduces additional runtime deps, the container may fail. Verify with thorough runtime tests
Missing packages/files
- None explicitly mentioned; the failure is due to API mismatch, not missing dependencies
Files referenced
- libs/core/runtime/setup.rs (lines ~196, 200, 204, 209, 216)
Recommended next steps
- Align crate versions so trait signatures match implementations (update deno_core and runtime_setup or pin compatible versions)
- Re-run cargo build: cargo build --workspace --release
- Perform thorough runtime tests to confirm dynamic/runtime dependencies are satisfied in the final imageFROM ubuntu:22.04 as builder
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies and tooling
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
cmake \
ca-certificates \
curl \
git \
unzip \
xz-utils && \
rm -rf /var/lib/apt/lists/*
# Install Rust toolchain (stable)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Build the workspace from source
WORKDIR /deno
COPY . .
RUN cargo update --workspace
# Do not use --locked to allow Cargo.lock to update if necessary
RUN cargo build --workspace --release
############################################################
# Runtime image
FROM ubuntu:22.04 as runtime
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
openssl \
zlib1g \
libsqlite3-0 && \
rm -rf /var/lib/apt/lists/*
# Copy the built binary from the builder stage
COPY --from=builder /deno/cli/target/release/deno /usr/local/bin/deno
RUN chmod +x /usr/local/bin/deno
ENTRYPOINT ["/usr/local/bin/deno"]
Build status - VerifyBuild: build_failed - Command: RUN cargo build --workspace --release (builder step 7/7); Exit code 101 - Failing context: deno_core crate failing to compile during cargo build Exact errors (trait-implementation signature mismatches in deno_core) - 1) post_task: implemented 2 params but trait has 3 - File: libs/core/runtime/setup.rs:196:16 - Trait: fn(&Self, *mut c_void, Task) - Implemented: fn post_task(&self, isolate_ptr: *mut c_void) - 2) post_non_nestable_task: implemented 2 params but trait has 3 - File: libs/core/runtime/setup.rs:200:29 - Trait: fn(&Self, *mut c_void, Task) - Implemented: fn post_non_nestable_task(&self, isolate_ptr: *mut c_void) - 3) post_delayed_task: implemented 3 params but trait has 4 - File: libs/core/runtime/setup.rs:204:24 - Trait: fn(&Self, *mut c_void, Task, f64) - Implemented: fn post_delayed_task(&self, isolate_ptr: *mut c_void, delay_in_seconds: f64) - 4) post_non_nestable_delayed_task: implemented 3 params but trait has 4 - File: libs/core/runtime/setup.rs:209:5 - Trait: fn(&Self, *mut c_void, Task, f64) - Implemented: (self, isolate_ptr, delay_in_seconds) - 5) post_idle_task: implemented 2 params but trait has 3 - File: libs/core/runtime/setup.rs:216:21 - Trait: fn(&Self, *mut c_void, IdleTask) - Implemented: fn post_idle_task(&self, isolate_ptr: *mut c_void) Notes - 61.90 and 62.15: could not compile deno_core (lib) due to these errors - Missing packages/files: none stated Version/mismatch - Rust toolchain: latest update on 2026-03-05 for version 1.94.0 (4a4ef493e 2026-03-02) - Indication: trait-implementation signature mismatch likely due to crate version vs Rust API changes (deno_core vs rustc API) Context - Failures originate from deno_core compilation during cargo build, caused by core runtime setup signature mismatches. Actionable next steps - Align implemented method signatures in libs/core/runtime/setup.rs with the trait definitions (or update deno_core to a version compatible with the current toolchain). - Consider updating/downgrading deno_core to match Rust 1.94.0 API. - Run cargo build with --locked to avoid lockfile drift if appropriate.
# Dockerfile to build Deno workspace from source and package a runnable binary
FROM ubuntu:jammy-20260210.1 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies needed to compile the Rust workspace
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
ca-certificates \
curl \
git \
cmake \
&& rm -rf /var/lib/apt/lists/*
# Install Rust toolchain (stable)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Copy the full repository and build from source
WORKDIR /deno
COPY . .
# Build the workspace from source, honoring Cargo.lock for reproducibility
RUN cargo build --workspace --locked --release
# Final runtime image
FROM ubuntu:jammy-20260210.1
ENV DEBIAN_FRONTEND=noninteractive
# Install minimal runtime dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libssl3 \
zlib1g \
libsqlite3-0 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Copy the built deno binary from the builder stage
COPY --from=build /deno/cli/target/release/deno /deno
# Provide a convenient symlink in PATH
RUN ln -s /deno /usr/local/bin/deno
ENTRYPOINT ["/deno"]
#ignore git and cargo build directories and other heavy items .git target node_modules *.log Cargo.lock
Docker build failure summary
- Failing step
- [build 6/6] RUN cargo build --workspace --locked --release
- Exact error message and exit code
- Error:
- "the lock file /deno/Cargo.lock needs to be updated but --locked was passed to prevent this"
- "If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead."
- Exit code: 101
- Missing packages or files mentioned
- The lock file target: /deno/Cargo.lock needs to be updated (Cargo.lock out-of-date; locked build prevented update)
- Version mismatch / tooling details
- Rust compiler version installed: rustc 1.94.0 (4a4ef493e 2026-03-02)
- Cargo toolchain channel used for build: 1.92.0 (1.92.0-x86_64-unknown-linux-gnu)
- Mismatch observed: rustc 1.94.0 vs cargo toolchain 1.92.0 during the build, which can cause lockfile/toolchain consistency issues
- Context note
- This occurs while building in an Ubuntu Jammy-based image (base from Ubuntu jammy-20260210.1) and running Cargo with --locked, which requires Cargo.lock to be up-to-date with Cargo.toml.# Dockerfile to build Deno workspace from source and package a runnable binary
FROM ubuntu:jammy-20260210.1 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies needed to compile the Rust workspace
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
ca-certificates \
curl \
git \
cmake \
&& rm -rf /var/lib/apt/lists/*
# Install Rust toolchain (stable)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Copy the full repository and build from source
WORKDIR /deno
COPY . .
# Ensure Cargo.lock is up-to-date and build the workspace from source
RUN cargo generate-lockfile || true
RUN cargo build --workspace --release
# Final runtime image
FROM ubuntu:jammy-20260210.1
ENV DEBIAN_FRONTEND=noninteractive
# Install minimal runtime dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libssl3 \
zlib1g \
libsqlite3-0 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Copy the built deno binary from the builder stage
COPY --from=build /deno/target/release/deno /deno
# Provide a convenient symlink in PATH
RUN ln -s /deno /usr/local/bin/deno
ENTRYPOINT ["/deno"]
Build status: build_failed
Command: [build 7/7] RUN cargo build --workspace --release
Exit code: 101 (Docker build failed: cargo build did not complete successfully)
Primary errors (5 E0050 parameter-mismatch in libs/core/runtime/setup.rs):
- error[E0050]: method `post_task` has 2 parameters but the declaration in trait `post_task` has 3
- libs/core/runtime/setup.rs:196:16
- snippet: fn post_task(&self, isolate_ptr: *mut c_void) {
- note: `post_task` from trait: `fn(&Self, *mut c_void, Task)`
- error[E0050]: method `post_non_nestable_task` has 2 parameters but the declaration in trait `post_non_nestable_task` has 3
- libs/core/runtime/setup.rs:200:29
- snippet: fn post_non_nestable_task(&self, isolate_ptr: *mut c_void) {
- note: `post_non_nestable_task` from trait: `fn(&Self, *mut c_void, Task)`
- error[E0050]: method `post_delayed_task` has 3 parameters but the declaration in trait `post_delayed_task` has 4
- libs/core/runtime/setup.rs:204:24
- snippet: fn post_delayed_task(&self, isolate_ptr: *mut c_void, delay_in_seconds: f64) {
- note: `post_delayed_task` from trait: `fn(&Self, *mut c_void, Task, f64)`
- error[E0050]: method `post_non_nestable_delayed_task` has 3 parameters but the declaration in trait `post_non_nestable_delayed_task` has 4
- libs/core/runtime/setup.rs:209:5
- snippet: &self, isolate_ptr: *mut c_void, delay_in_seconds: f64,
- note: `post_non_nestable_delayed_task` from trait: `fn(&Self, *mut c_void, Task, f64)`
- error[E0050]: method `post_idle_task` has 2 parameters but the declaration in trait `post_idle_task` has 3
- libs/core/runtime/setup.rs:216:21
- snippet: fn post_idle_task(&self, isolate_ptr: *mut c_void) {
- note: `post_idle_task` from trait: `fn(&Self, *mut c_void, IdleTask)`
Context:
- Build fails while compiling deno_core (lib) due to multiple parameter-mismatch errors between trait declarations and their implementations in libs/core/runtime/setup.rs.
- Crate: deno_core v0.391.0 (path /deno/core) with deno_runtime/permissions components building prior to failure.
Version/mismatch notes:
- Indicates a trait implementation API mismatch: trait methods expect 3 or 4 parameters while implementations provide 2 or 3.
- Suggests a version/API mismatch between deno_core and its runtime traits, not a missing dependency.
Missing packages/files:
- No missing packages or files reported; failure is due to source-level API mismatch.
Crate/files involved:
- libs/core/runtime/setup.rs
- deno_core lib (v0.391.0), path /deno/core
Suggested next steps:
- Align trait signatures with implementations (or update to compatible versions across deno_core and runtime traits).
- Check dependency versions for deno_core and related runtime crates to resolve API drift.# Dockerfile to build Deno workspace from source and package a runnable binary
FROM ubuntu:jammy-20260210.1 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies needed to compile the Rust workspace
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
ca-certificates \
curl \
git \
cmake \
&& rm -rf /var/lib/apt/lists/*
# Install Rust toolchain (stable)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Copy the full repository and build from source
WORKDIR /deno
COPY . .
# Ensure Cargo.lock is up-to-date and build the workspace from source
RUN cargo generate-lockfile || true
RUN cargo build --workspace --release
# Final runtime image
FROM ubuntu:jammy-20260210.1
ENV DEBIAN_FRONTEND=noninteractive
# Install minimal runtime dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libssl3 \
zlib1g \
libsqlite3-0 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Copy the built deno binary from the builder stage
COPY --from=build /deno/cli/target/release/deno /deno
# Provide a convenient symlink in PATH
RUN ln -s /deno /usr/local/bin/deno
ENTRYPOINT ["/deno"]
Concerns
- Container runs as root; consider adding a non-root user for security.
- COPY path assumes the binary is at /deno in the final stage; if workspace layout changes, this may break.
- ENTRYPOINT is set to /deno; ensure the binary has execute permissions and is present in all environments.
Build error
- Failing step: Failing command: RUN cargo build --workspace --release (Dockerfile: step 31)
Exact error messages and exit code
- exit code: 101
- error[E0050]: method `post_task` has 2 parameters but the declaration in trait `post_task` has 3
--> libs/core/runtime/setup.rs:196:16
|
196 | fn post_task(&self, isolate_ptr: *mut c_void) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 3 parameters, found 2
|
= note: `post_task` from trait: `fn(&Self, *mut c_void, Task)`
- error[E0050]: method `post_non_nestable_task` has 2 parameters but the declaration in trait `post_non_nestable_task` has 3
--> libs/core/runtime/setup.rs:200:29
|
200 | fn post_non_nestable_task(&self, isolate_ptr: *mut c_void) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 3 parameters, found 2
|
= note: `post_non_nestable_task` from trait: `fn(&Self, *mut c_void, Task)`
- error[E0050]: method `post_delayed_task` has 3 parameters but the declaration in trait `post_delayed_task` has 4
--> libs/core/runtime/setup.rs:204:24
|
204 | fn post_delayed_task(&self, isolate_ptr: *mut c_void, delay_in_seconds: f64) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 4 parameters, found 3
|
= note: `post_delayed_task` from trait: `fn(&Self, *mut c_void, Task, f64)`
- error[E0050]: method `post_non_nestable_delayed_task` has 3 parameters but the declaration in trait `post_non_nestable_delayed_task` has 4
--> libs/core/runtime/setup.rs:209:5
|
209 | / &self,
210 | | isolate_ptr: *mut c_void,
211 | | delay_in_seconds: f64,
| |_________________________^ expected 4 parameters, found 3
|
= note: `post_non_nestable_delayed_task` from trait: `fn(&Self, *mut c_void, Task, f64)`
- error[E0050]: method `post_idle_task` has 2 parameters but the declaration in trait `post_idle_task` has 3
--> libs/core/runtime/setup.rs:216:21
|
216 | fn post_idle_task(&self, isolate_ptr: *mut c_void) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 3 parameters, found 2
|
= note: `post_idle_task` from trait: `fn(&Self, *mut c_void, IdleTask)`
- For more information about this error, try `rustc --explain E0050`.
- error: could not compile `deno_core` (lib) due to 5 previous errors
Missing packages or files mentioned
- None explicitly mentioned in the error output. The failure is a Rust compile-time type error.
Version mismatch / root cause notes
- The errors indicate a trait implementation signature mismatch (E0050): multiple impl methods have fewer parameters than the corresponding trait declarations.
- This pattern suggests an API/toolchain crate version mismatch (e.g., deno_core vs libs/core runtime setup.rs) or incompatible crate versions causing trait method signatures to diverge. The log shows standard cargo/Rust tooling activity but no explicit version numbers for deno_core, only generic crate updates; the symptom is a crate API incompatibility rather than a missing file.
Recommendation (actionable)
- Inspect Cargo.toml in the workspace and ensure deno_core version matches the libs/core runtime setup.rs expectations.
- Run cargo update -p deno_core or align crate versions so trait signatures match (add Task parameter where required; ensure post_task, post_non_nestable_task, post_idle_task and delayed variants signatures align with their trait definitions).
- If upgrading is intended, modify the corresponding trait/impl to be consistent across crates, or pin compatible versions.
- Rebuild in a clean environment; verify Dockerfile COPY path /deno and perform ensure executable permissions.# Dockerfile to build Deno workspace from source and package a runnable binary
FROM ubuntu:jammy-20260210.1 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies needed to compile the Rust workspace
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
ca-certificates \
curl \
git \
cmake \
&& rm -rf /var/lib/apt/lists/*
# Install Rust toolchain via rustup (pin to a known stable version)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Pin to a known Rust toolchain version to avoid API mismatches with older crates
RUN rustup install 1.92.0 && rustup default 1.92.0
# Copy the full repository and build from source
WORKDIR /deno
COPY . .
# Ensure Cargo.lock is present/up-to-date and build the workspace from source
RUN cargo generate-lockfile || true
RUN cargo build --workspace --release
# Final runtime image
FROM ubuntu:jammy-20260210.1
ENV DEBIAN_FRONTEND=noninteractive
# Install minimal runtime dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libssl3 \
zlib1g \
libsqlite3-0 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Copy the built deno binary from the builder stage
COPY --from=build /deno/target/release/deno /usr/local/bin/deno
# Provide a convenient symlink in PATH
RUN chmod +x /usr/local/bin/deno
ENTRYPOINT ["/usr/local/bin/deno"]
- Build status: build_failed. Docker build step failed at final cargo build with exit code 101.
- Failing step: RUN cargo build --workspace --release
- Exact errors (E0050) in libs/core/runtime/setup.rs:
- post_task: method has 2 parameters but trait declares 3
- line 196: fn post_task(&self, isolate_ptr: *mut c_void) { vs trait: fn(&Self, *mut c_void, Task)
- post_non_nestable_task: 2 vs 3
- line 200: fn post_non_nestable_task(&self, isolate_ptr: *mut c_void) { vs trait: fn(&Self, *mut c_void, Task)
- post_delayed_task: 3 vs 4
- line 204: fn post_delayed_task(&self, isolate_ptr: *mut c_void, delay_in_seconds: f64) { vs trait: fn(&Self, *mut c_void, Task, f64)
- post_non_nestable_delayed_task: 3 vs 4
- lines 209 (signature shows 3 params) vs trait: fn(&Self, *mut c_void, Task, f64)
- post_idle_task: 2 vs 3
- line 216: fn post_idle_task(&self, isolate_ptr: *mut c_void) { vs trait: fn(&Self, *mut c_void, IdleTask)
- File/lines: libs/core/runtime/setup.rs, 196, 200, 204, 209, 216
- Environment/version notes:
- Rust toolchain installed: 1.92.0 (x86_64-unknown-linux-gnu)
- Logs show 1.92.0 syncing/installed; potential API mismatch between deno_core and codebase
- Root cause: trait-signature mismatch likely due to version/API mismatch between deno_core and the surrounding codebase (different parameter counts in trait vs impl).
- Missing packages/files: none explicitly reported; issue is code API mismatch, not a missing package.
- Security note: final image runs as root; consider adding a non-root user.
- Recommendations:
- Align versions: update deno_core or adjust code to match the trait signatures, ensuring Task and delay params align with trait definitions.
- Run cargo update to resolve crate-version mismatches, or pin compatible versions for deno_core.
- If necessary, upgrade the Rust toolchain or pin to a toolchain crate version compatible with the selected deno_core release.
- After alignment, re-run the Docker build.# Dockerfile to build Deno workspace from source and package a runnable binary
FROM ubuntu:jammy-20260210.1 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies needed to compile the Rust workspace
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
ca-certificates \
curl \
git \
cmake \
&& rm -rf /var/lib/apt/lists/*
# Install Rust toolchain via rustup (stable) and pin to a known good version
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Install a specific stable Rust toolchain to avoid API drift with crates
RUN rustup toolchain install 1.96.0 && rustup default 1.96.0
# Copy the full repository and build from source
WORKDIR /deno
COPY . .
# Ensure Cargo.lock is present/up-to-date and build the workspace from source
RUN rustc --version
RUN cargo generate-lockfile || true
RUN cargo build --workspace --release
# Final runtime image
FROM ubuntu:jammy-20260210.1
ENV DEBIAN_FRONTEND=noninteractive
# Install minimal runtime dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libssl3 \
zlib1g \
libsqlite3-0 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Copy the built deno binary from the builder stage
COPY --from=build /deno/target/release/deno /usr/local/bin/deno
# Ensure the binary is executable
RUN chmod +x /usr/local/bin/deno
ENTRYPOINT ["/usr/local/bin/deno"]
- Failing command/step - Dockerfile line 25: RUN rustup toolchain install 1.96.0 && rustup default 1.96.0 - Exact error message and exit code - info: syncing channel updates for 1.96.0-x86_64-unknown-linux-gnu - error: could not download nonexistent rust version `1.96.0-x86_64-unknown-linux-gnu`: could not download file from 'https://static.rust-lang.org/dist/rust-1.96.0-x86_64-unknown-linux-gnu.tar.gz.sha256' to '/root/.rustup/tmp/l0h_4vqzsk9zd2nr_file': http request returned an unsuccessful status code: 404 - The process did not complete successfully: exit code: 1 - Missing packages or files mentioned - The rustup attempt cannot download the required rust toolchain version 1.96.0; the specific tarball SHA256 file rust-1.96.0-x86_64-unknown-linux-gnu.tar.gz.sha256 is returning 404 (not found) - Version mismatch / context - Rust version requested: 1.96.0 (1.96.0-x86_64-unknown-linux-gnu) - rustup reports the version is nonexistent and cannot download it (HTTP 404), indicating a mismatch or deprecation of that old version on the Rust distribution server
# Dockerfile to build Deno workspace from source and package a runnable binary
FROM ubuntu:jammy-20260210.1 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies needed to compile the Rust workspace
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
ca-certificates \
curl \
git \
cmake \
&& rm -rf /var/lib/apt/lists/*
# Install Rust toolchain via rustup (stable)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Copy the full repository and build from source
WORKDIR /deno
COPY . .
# Ensure Cargo.lock is present/up-to-date and build the workspace from source
RUN cargo generate-lockfile || true
RUN cargo build --workspace --release
# Final runtime image
FROM ubuntu:jammy-20260210.1
ENV DEBIAN_FRONTEND=noninteractive
# Install minimal runtime dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libssl3 \
zlib1g \
libsqlite3-0 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Create a non-root user for running Den o
RUN useradd -m -u 1000 deno
USER deno
WORKDIR /home/deno
# Copy the built deno binary from the builder stage
COPY --from=build /deno/cli/target/release/deno /home/deno/deno
# Make sure the binary is executable
RUN chmod +x /home/deno/deno
# Expose the binary via PATH for convenience
ENV PATH="/home/deno:${PATH}"
ENTRYPOINT ["/home/deno/deno"]
Build status: build_failed
Build details
- Failing step (command): Build stage 7/7
- Command: RUN cargo build --workspace --release
- Exit code: 101
Potential concerns
- COPY path (/deno/cli/target/release/deno) may not exist if workspace layout differs; ensure build artifact path matches the repository's cargo layout.
- base tag ubuntu:jammy-20260210.1 may not exist in all registries; if missing, the build will fail; consider pinning to a known release tag or digest.
- No HEALTHCHECK defined; consider adding a readiness probe for production stability.
Exact error messages (E0050, summarized)
- error[E0050]: method `post_task` has 2 parameters but the declaration in trait `post_task` has 3
- location: libs/core/runtime/setup.rs:196:16
- snippet:
196 | fn post_task(&self, isolate_ptr: *mut c_void) {
- note: trait: `fn(&Self, *mut c_void, Task)`
- error[E0050]: method `post_non_nestable_task` has 2 parameters but the declaration in trait `post_non_nestable_task` has 3
- location: libs/core/runtime/setup.rs:200:29
- note: trait: `fn(&Self, *mut c_void, Task)`
- error[E0050]: method `post_delayed_task` has 3 parameters but the declaration in trait `post_delayed_task` has 4
- location: libs/core/runtime/setup.rs:204:24
- note: trait: `fn(&Self, *mut c_void, Task, f64)`
- error[E0050]: method `post_non_nestable_delayed_task` has 3 parameters but the declaration in trait `post_non_nestable_delayed_task` has 4
- location: libs/core/runtime/setup.rs:209:5
- note: trait: `fn(&Self, *mut c_void, Task, f64)`
- error[E0050]: method `post_idle_task` has 2 parameters but the declaration in trait `post_idle_task` has 3
- location: libs/core/runtime/setup.rs:216:21
- note: trait: `fn(&Self, *mut c_void, IdleTask)`
Context
- These errors indicate a trait-implementation signature mismatch (E0050), likely due to a crate/API version mismatch between deno_core and related runtime traits.
Build context
- Dockerfile step: cargo build --workspace --release (build step 7/7)
- Excerpt end: "Dockerfile:30" and final line "exit code: 101"
Summary: The build fails due to five E0050 trait-implementation signature mismatches in libs/core/runtime/setup.rs, likely from a deno_core/runtime trait API version mismatch. Actionable next steps: align trait signatures with the implemented functions or update dependencies to a matching crate/API version; verify artifact paths and base image tag if the build environment differs.- Purpose: Implement a custom V8 platform to wake per-isolate event loops when V8 posts tasks (including background/foreground tasks) and to manage delayed foreground tasks via a single timer thread. - Global state and data structures - IsolateWakeEntry: holds an Arc<AtomicWaker> for a single isolate. - IsolateWakerRegistry: maps isolate_ptr (usize) to IsolateWakeEntry and tracks pending_wakes for isolates not yet registered. - ISOLATE_WAKERS: LazyLock<Mutex<IsolateWakerRegistry>> global registry. - TimerEntry: (deadline: Instant, isolate_key: usize) for delayed tasks. - DELAYED_TASK_SENDER: single shared channel sender (with a dedicated thread named "deno-v8-timer") that processes TimerEntry items. - Core behavior - isolate_ptr_to_key(ptr): converts v8::UnsafeRawIsolatePtr to usize via transmute, with a compile-time size check. - register_isolate_waker / unregister_isolate_waker: manage registry entries; wake immediately if a pending wake exists. - wake_isolate(key): wakes the isolate’s waker if registered; otherwise marks as pending. - Timer thread (delayed_task_thread) - Maintains a BinaryHeap<TimerEntry> ordered by earliest deadline. - Blocks on rx until new entries or timeout for next timer. - Drains extra entries, then wakes isolates whose deadlines have passed. - Platform integration - DenoPlatformImpl: provides wake_immediate (for foreground tasks) and wake_delayed (schedules TimerEntry via DELAYED_TASK_SENDER). - v8::PlatformImpl implementation: routes post_task, post_non_nestable_task to wake_immediate; post_delayed_task and post_non_nestable_delayed_task to wake_delayed; post_idle_task to wake_immediate. - Initialization and V8 flags - v8_init: sets ICU data if enabled; builds V8 flags from features (e.g., snapshot, lazy parsing, expose natives); initializes a custom or provided V8 platform; initializes V8. - init_v8: ensures single initialization with Once; enforces consistent snapshot mode via DENO_SNAPSHOT and DENO_SNAPSHOT_SET. - Isolate creation - create_isolate will_snapshot path: uses snapshot::create_snapshot_creator with external refs and optional startup snapshot. - Non-snapshot path: applies external_refs; may attach a startup snapshot blob; Windows workaround mutex for first snapshot init. - Post-creation: configures microtasks policy, stack traces, and multiple host/WASM callbacks (promise rejection, stack trace prep, host import callbacks, wasm promise resolution). - Callbacks and features - Sets promise_reject_callback, prepare_stack_trace_callback, host import/module callbacks, and wasm_resolve_promise_callback. - Supports feature-driven behavior: include_icu_data, snapshot_flags_eager_parse, unsafe_use_unprotected_platform. - Notable details - Uses a per-process single timer thread to optimize delayed wakeups. - Uses an AtomicWaker-based per-isolate wake path. - Windows-specific guard around snapshot initialization.
# Dockerfile to build Deno workspace from source and package a runnable binary
FROM ubuntu:jammy-20260210.1 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies needed to compile the Rust workspace
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
libssl-dev \
zlib1g-dev \
libsqlite3-dev \
ca-certificates \
curl \
git \
cmake \
&& rm -rf /var/lib/apt/lists/*
# Install Rust toolchain via rustup (stable)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
# Copy the full repository and build from source
WORKDIR /deno
COPY . .
# Ensure Cargo.lock is present/up-to-date and build the workspace from source
RUN cargo update || true
RUN cargo build --workspace --release
# Final runtime image
FROM ubuntu:jammy-20260210.1
ENV DEBIAN_FRONTEND=noninteractive
# Install minimal runtime dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libssl3 \
zlib1g \
libsqlite3-0 \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Create a non-root user for running deno
RUN useradd -m -u 1000 deno
USER deno
WORKDIR /home/deno
# Copy the built deno binary from the builder stage
COPY --from=build /deno/cli/target/release/deno /home/deno/deno
# Make sure the binary is executable
RUN chmod +x /home/deno/deno
# Expose the binary via PATH for convenience
ENV PATH="/home/deno:${PATH}"
ENTRYPOINT ["/home/deno/deno"]
Concerns - Binary path variability: path to built deno binary may differ by workspace layout; ensure the binary path matches actual cargo output. - No healthcheck or basic smoke test beyond version/help; could add a small eval to ensure runtime executes. - ENTRYPOINT currently a hard path to the binary; for extensibility consider using CMD or a wrapper script to handle environment changes. Build error - Failing step: Build stage [build 7/7]: RUN cargo build --workspace --release - Exact error messages and exit code: - error[E0050]: method `post_task` has 2 parameters but the declaration in trait `post_task` has 3 - error[E0050]: method `post_non_nestable_task` has 2 parameters but the declaration in trait `post_non_nestable_task` has 3 - error[E0050]: method `post_delayed_task` has 3 parameters but the declaration in trait `post_delayed_task` has 4 - error[E0050]: method `post_non_nestable_delayed_task` has 3 parameters but the declaration in trait `post_non_nestable_delayed_task` has 4 - error[E0050]: method `post_idle_task` has 2 parameters but the declaration in trait `post_idle_task` has 3 - error: could not compile `deno_core` (lib) due to 5 previous errors - warning: build failed, waiting for other jobs to finish... - error: could not compile `deno_core` (lib) due to 5 previous errors - Dockerfile: cargo build --workspace --release did not complete successfully: exit code: 101 - Failing command/step details: - Command: cargo build --workspace --release - Context: part of Dockerfile final runtime image build (deno core compilation) - Missing packages or files mentioned: - No missing packages or files reported; errors are compilation API mismatches, not missing files. Version mismatch / mismatch info - API mismatch indicated by multiple trait-vs-implementation param-count errors (E0050) in deno_core runtime setup: - trait methods expect more parameters than implemented in several methods (post_task, post_non_nestable_task, post_delayed_task, post_non_nestable_delayed_task, post_idle_task) - This suggests a crate/version drift/API incompatibility between deno_core and its runtime crates, not a missing dependency. Summary - The build failed during deno_core compilation due to API/trait-implementation parameter mismatches, indicating a crate/version drift between deno_core and its runtime crates. No missing files were reported. Actionable next steps (not in log) would be to align crate versions (update/lock deno_core and runtime crates to compatible revisions), verify workspace outputs to match the expected binary path, and consider adjusting ENTRYPOINT/CMD or adding a wrapper for environment handling.