# Build-stage: compile Xamarin.Android bindings for the ARCore component from source
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
# Install required system dependencies (Git, Java, unzip, etc.)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
ca-certificates \
curl \
unzip \
wget \
gnupg \
openjdk-11-jdk-headless \
&& rm -rf /var/lib/apt/lists/*
# Set JAVA_HOME for Java tools
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
# Copy the repository into the container
WORKDIR /src
COPY . ./
# Install Cake tool (dotnet global tool)
RUN dotnet tool install -g cake.tool || true
ENV PATH="${PATH}:/root/.dotnet/tools"
# Build ARCore component (bindings) from its folder
WORKDIR /src/Android/ARCore
# Run externals to fetch third-party dependencies
RUN dotnet cake --target=externals
# Build the libraries (bindings) and generate NuGet packages
RUN dotnet cake --name=ARCore --target=libs --target=nuget
# Optionally build samples (requires additional toolchains on host to run)
# RUN dotnet cake --name=ARCore --target=samples
# Collect artifacts for the final image
RUN mkdir -p /artifacts/ARCore
COPY --from=build /src/Android/ARCore/output /artifacts/ARCore/
# Final runtime image: a slim runtime with the built artifacts
FROM debian:bullseye-slim AS runtime
# Copy artifacts from the build stage
COPY --from=build /artifacts/ARCore /artifacts/ARCore
# Provide an interactive shell for inspection and usage
CMD ["bash"]
# Multi-stage build to create ARCore Xamarin.Android bindings from source
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
# Install required system dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
ca-certificates \
curl \
unzip \
wget \
gnupg \
openjdk-11-jdk-headless \
&& rm -rf /var/lib/apt/lists/*
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
WORKDIR /src
COPY . ./
# Install Cake tool (dotnet global tool)
RUN dotnet tool install -g cake.tool || true
ENV PATH="${PATH}:/root/.dotnet/tools"
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
# Fetch externals
RUN dotnet cake --target=externals
# Build libraries and nuget packages
RUN dotnet cake --name=ARCore --target=libs --target=nuget
# Copy artifacts to a dedicated folder for runtime image
RUN mkdir -p /artifacts/ARCore
RUN cp -r ./output /artifacts/ARCore/
# Final runtime image
FROM debian:bullseye-slim AS runtime
# Copy artifacts from build stage
COPY --from=build /artifacts/ARCore /artifacts/ARCore
# Default command
CMD ["bash"]
# Multi-stage build: compile Xamarin.Android ARCore bindings from source using Ubuntu 22.04
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
# Install basic tooling and JDK
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
wget \
gnupg \
git \
openjdk-11-jdk-headless \
&& rm -rf /var/lib/apt/lists/*
# Install .NET 7 SDK from Microsoft's apt repo
RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /usr/share/keyrings/microsoft.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/ubuntu/22.04/prod jammy main" > /etc/apt/sources.list.d/dotnet.list
RUN apt-get update \
&& apt-get install -y --no-install-recommends dotnet-sdk-7.0 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY . .
# Install Cake tool (dotnet global tool)
RUN dotnet tool install -g cake.tool || true
ENV PATH="${PATH}:/root/.dotnet/tools"
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
# Downloads externals (third-party dependencies)
RUN dotnet cake --target=externals
# Build libs and nuget packages
RUN dotnet cake --name=ARCore --target=libs --target=nuget
# Copy artifacts for runtime image
RUN mkdir -p /artifacts/ARCore
RUN cp -r ./output /artifacts/ARCore/
# Stage 2: runtime image
FROM ubuntu:22.04-slim AS runtime
WORKDIR /app
# Copy ARCore artifacts from build stage
COPY --from=builder /artifacts/ARCore /artifacts/ARCore
# Default command (interactive shell for testing)
CMD ["bash"]
# Multi-stage build: compile Xamarin.Android ARCore bindings from source using .NET SDK
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
# Install basic tools
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
ca-certificates \
curl \
unzip \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY . ./
# Install Cake tool (dotnet global tool)
RUN dotnet tool install -g cake.tool || true
ENV PATH="${PATH}:/root/.dotnet/tools"
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
# Resolve externals (external dependencies) and build libraries
RUN dotnet cake --target=externals
RUN dotnet cake --name=ARCore --target=libs --target=nuget
# Collect artifacts for final image
RUN mkdir -p /artifacts/ARCore
RUN cp -r ./output /artifacts/ARCore/
# Stage 2: runtime image (minimal)
FROM debian:bookworm-slim AS runtime
WORKDIR /app
# Copy ARCore artifacts from build stage
COPY --from=build /artifacts/ARCore /app/ARCore
# Default command for debugging
CMD ["bash"]
# Multi-stage build for Xamarin.Android ARCore bindings from source
FROM ubuntu:22.04 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies and JDK
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
gnupg \
openjdk-11-jdk-headless \
&& rm -rf /var/lib/apt/lists/*
# Install .NET 7 SDK
RUN mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/keyrings/microsoft.gpg \
&& chmod 644 /etc/apt/keyrings/microsoft.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/microsoft.gpg] https://packages.microsoft.com/ubuntu/22.04/prod jammy main" > /etc/apt/sources.list.d/dotnet.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends dotnet-sdk-7.0 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /src
COPY . ./
# Install Cake tool (dotnet global tool)
RUN dotnet tool install -g cake.tool || true
ENV PATH="${PATH}:/root/.dotnet/tools"
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
# Resolve externals (external dependencies) and build libraries
RUN dotnet cake --target=externals
RUN dotnet cake --name=ARCore --target=libs --target=nuget
# Copy artifacts for runtime image
RUN mkdir -p /artifacts/ARCore
RUN cp -r output /artifacts/ARCore/
# Stage 2: runtime image (minimal)
FROM debian:bookworm-slim AS runtime
WORKDIR /app
# Copy ARCore artifacts from build stage
COPY --from=build /artifacts/ARCore /app/ARCore
# Default command for debugging
CMD ["bash"]
# Ignore VCS and local environment files .git/ .gitignore *.dll *.exe *.bin *.obj *.o *.pdb *.cache *.csproj.user *.userprefs .nuget/ *.nupkg output/ **/bin/ **/obj/
- Failing step (command): [build 8/11] RUN dotnet cake --target=externals
- Exact error message and exit code:
ERROR: process "/bin/sh -c dotnet cake --target=externals" did not complete successfully: exit code: 145
The command could not be loaded, possibly because:
* You intended to execute a .NET application:
The application 'cake' does not exist.
* You intended to execute a .NET SDK command:
No .NET SDKs were found.
Download a .NET SDK:
https://aka.ms/dotnet/download
Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found
- Missing packages/files mentioned:
- The application 'cake' does not exist. (Cake CLI not found)
- No .NET SDKs were found. (SDK not detected in this step)
- Version/mismatch info:
- Later in the build (Step 10), .NET SDKs/runtime are installed (dotnet-sdk-7.0 and related packages), but Step 8 fails due to missing Cake tool and an apparent SDK discovery issue at that point in the build. This suggests a PATH/availability timing issue rather than a straightforward version mismatch.# Multi-stage build for Xamarin.Android ARCore bindings from source using Ubuntu 22.04
FROM ubuntu:22.04 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install required tools and JDK
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
gnupg \
openjdk-11-jdk-headless \
&& rm -rf /var/lib/apt/lists/*
# Install Microsoft .NET SDK 7.0
RUN curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -o packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt-get update \
&& apt-get install -y --no-install-recommends dotnet-sdk-7.0 \
&& rm -rf /var/lib/apt/lists/*
# Install Cake tool (global dotnet tool)
RUN dotnet tool install --global cake.tool \
&& export PATH="$PATH:/root/.dotnet/tools" \
&& dotnet --version
# Set PATH for dotnet tools
ENV PATH="${PATH}:/root/.dotnet/tools"
WORKDIR /src
COPY . ./
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
# Fetch externals (third-party dependencies) and build libs/nuget
RUN dotnet cake --target=externals
RUN dotnet cake --name=ARCore --target=libs
RUN dotnet cake --name=ARCore --target=nuget
# Copy artifacts for runtime image
RUN mkdir -p /artifacts/ARCore
RUN cp -r ./output /artifacts/ARCore/
# Stage 2: runtime image (smaller footprint)
FROM debian:bookworm-slim AS runtime
WORKDIR /app
# Copy ARCore artifacts from build stage
COPY --from=build /artifacts/ARCore /app/ARCore
# Default command for debugging
CMD ["bash"]
Summary of Docker build error
- Failing step
- [build 4/12] RUN dotnet tool install --global cake.tool && export PATH="$PATH:/root/.dotnet/tools" && dotnet --version
- Exact error message and exit code
- The command could not be loaded, possibly because:
* You intended to execute a .NET application:
The application 'tool' does not exist.
* You intended to execute a .NET SDK command:
No .NET SDKs were found.
- Download a .NET SDK:
https://aka.ms/dotnet/download
- Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found
- ERROR: failed to solve: process "/bin/sh -c dotnet tool install --global cake.tool && export PATH=\"$PATH:/root/.dotnet/tools\" && dotnet --version" did not complete successfully: exit code: 145
- Missing packages/files mentioned
- No .NET SDKs were found (No .NET SDKs were found).
- The application 'tool' (as invoked) does not exist.
- Version mismatch info
- The prior build step installed dotnet SDK 7.0.0 components (dotnet-sdk-7.0 and related packages were being installed in the log), but the current step reports no SDKs found for the dotnet tool install, indicating a runtime/SDK resolution issue rather than a clear version mismatch in the log. No explicit version mismatch is shown beyond the SDK installation attempt.# Multi-stage build for Xamarin.Android ARCore bindings from source
FROM ubuntu:22.04 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install essential build tools and JDK
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
openjdk-11-jdk-headless \
gnupg \
&& rm -rf /var/lib/apt/lists/*
# Install .NET SDK 7.0
RUN curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl -sL https://packages.microsoft.com/config/ubuntu/22.04/multiarch/prod.list -o /etc/apt/sources.list.d/microsoft-prod.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends dotnet-sdk-7.0 \
&& rm -rf /var/lib/apt/lists/*
# Install Cake tool (global dotnet tool)
RUN dotnet tool install --global Cake.Tool --version 1.0.0 \
&& echo 'export PATH="$PATH:/root/.dotnet/tools"' >> /root/.bashrc
ENV PATH="${PATH}:/root/.dotnet/tools"
WORKDIR /src
COPY . ./
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
# Resolve externals and build libs/nuget
RUN dotnet cake --target=externals
RUN dotnet cake --name=ARCore --target=libs --target=nuget
# Copy artifacts for runtime image
RUN mkdir -p /artifacts/ARCore
RUN cp -r output /artifacts/ARCore/
# Stage 2: runtime image (minimal)
FROM debian:bookworm-slim AS runtime
WORKDIR /app
# Copy ARCore artifacts from build stage
COPY --from=build /artifacts/ARCore /app/ARCore
# Default command for debugging
CMD ["bash"]
Build status: build_failed Key concerns - apt-key is deprecated on Ubuntu 22.04; consider using signed-by with a dedicated keyring. - The final runtime image has no HEALTHCHECK; adding one could improve observability. Failing step (Dockerfile RUN) - RUN curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && curl -sL https://packages.microsoft.com/config/ubuntu/22.04/multiarch/prod.list -o /etc/apt/sources.list.d/microsoft-prod.list && apt-get update && apt-get install -y --no-install-recommends dotnet-sdk-7.0 && rm -rf /var/lib/apt/lists/* Exact error messages and exit codes - "Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8))." - "E: Type '404:' is not known on line 1 in source list /etc/apt/sources.list.d/microsoft-prod.list" - "E: The list of sources could not be read." - "The overall build failed with exit code 100" - The log shows: "ERROR: ... did not complete successfully: exit code: 100" Missing packages or files mentioned - Failing source: Microsoft apt repository list at /etc/apt/sources.list.d/microsoft-prod.list. Content is invalid (contains a 404:), causing apt-get update to fail reading sources. Version information - Base image context: Ubuntu 22.04 (jammy) as seen in FROM sources and the Microsoft config URL (ubuntu/22.04). - Attempted to install: dotnet-sdk-7.0. - No explicit version-mismatch noted; failure caused by invalid Microsoft repository list rather than package version issues. Notes - apt-key deprecation warning appears before the failure, indicating an older Microsoft key import method is used. - Failure occurs before dotnet-sdk-7.0 can be installed due to unreadable/invalid Microsoft repository list. Actionable next steps - Verify Microsoft APT repository setup for Ubuntu 22.04; ensure /etc/apt/sources.list.d/microsoft-prod.list contents are valid and do not contain stray "404:" text. - Update repository addition to the current recommended approach (use trusted.gpg.d with a signed-by option instead of apt-key), then re-run: - apt-get update - apt-get install -y --no-install-recommends dotnet-sdk-7.0
# Multi-stage build for Xamarin.Android ARCore bindings from source
FROM ubuntu:22.04 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install essential tools and JDK
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
openjdk-11-jdk-headless \
gnupg \
&& rm -rf /var/lib/apt/lists/*
# Install .NET SDK 7.0 via Microsoft's official package (no apt-key)
RUN wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt-get update \
&& apt-get install -y --no-install-recommends dotnet-sdk-7.0 \
&& rm -rf /var/lib/apt/lists/*
# Install Cake tool (global dotnet tool)
RUN dotnet tool install --global Cake.Tool \
&& echo 'export PATH="$PATH:/root/.dotnet/tools"' >> /root/.bashrc
ENV PATH="${PATH}:/root/.dotnet/tools"
WORKDIR /src
COPY . ./
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
# Resolve externals and build libs/nuget
RUN dotnet cake --target=externals
RUN dotnet cake --name=ARCore --target=libs --target=nuget
# Copy artifacts for runtime image
RUN mkdir -p /artifacts/ARCore
RUN cp -r ./output /artifacts/ARCore/
# Stage 2: runtime image (minimal)
FROM debian:bookworm-slim AS runtime
WORKDIR /app
# Copy ARCore artifacts from build stage
COPY --from=build /artifacts/ARCore /app/ARCore
# Default command for debugging
CMD ["bash"]
- Exact error message and exit code - /bin/sh: 1: wget: not found - exit code: 127 - Failing command/step - Build step: [build 3/11] - Command: RUN wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb && apt-get update && apt-get install -y --no-install-recommends dotnet-sdk-7.0 && rm -rf /var/lib/apt/lists/* - Missing packages or files mentioned - wget is not installed in the image (missing package). - Version mismatch information - No version mismatch reported. The error is due to missing wget, not a version incompatibility. The build uses ubuntu:22.04 in one stage and Debian bookworm-slim in another, but the failure is unrelated to those versions. - Quick fix idea (optional) - Install wget in the image before this RUN, e.g., apt-get update && apt-get install -y wget, or replace wget with curl.
# Multi-stage build for Xamarin.Android ARCore bindings from source
FROM ubuntu:22.04 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install essential tools and JDK
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
openjdk-11-jdk-headless \
gnupg \
&& rm -rf /var/lib/apt/lists/*
# Install .NET SDK 7.0 via Microsoft's official package (no apt-key)
RUN wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt-get update \
&& apt-get install -y --no-install-recommends dotnet-sdk-7.0 \
&& rm -rf /var/lib/apt/lists/*
# Install Cake tool (global dotnet tool)
RUN dotnet tool install --global Cake.Tool \
&& echo 'export PATH="$PATH:/root/.dotnet/tools"' >> /root/.bashrc
ENV PATH="${PATH}:/root/.dotnet/tools"
WORKDIR /src
COPY . ./
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
# Resolve externals and build libs/nuget
RUN dotnet cake --target=externals
RUN dotnet cake --name=ARCore --target=libs --target=nuget
# Copy artifacts for runtime image
RUN mkdir -p /artifacts/ARCore
RUN cp -r ./output /artifacts/ARCore/
# Stage 2: runtime image (minimal)
FROM debian:bookworm-slim AS runtime
WORKDIR /app
# Copy ARCore artifacts from build stage
COPY --from=build /artifacts/ARCore /app/ARCore
# Default command for debugging
CMD ["bash"]
- Failing step (command): [build 3/11] RUN wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb && apt-get update && apt-get install -y --no-install-recommends dotnet-sdk-7.0 && rm -rf /var/lib/apt/lists/* - Exact error message and exit code: /bin/sh: 1: wget: not found (exit code: 127) - Missing packages/files mentioned: wget is not installed in the base image, causing the download step to fail. The step relies on downloading packages-microsoft-prod.deb via wget. - Version/mismatch notes: - The build stage uses Ubuntu 22.04 (jammy) as the base image, evidenced by the apt sources and the FROM ubuntu:22.04 line. - The log also shows a multi-stage setup with a runtime stage based on Debian bookworm-slim, which can introduce OS/library mismatches if not aligned with the build stage. - apt logs during the build show jammy-era packages being fetched, consistent with Ubuntu 22.04, not Debian. This hints at potential cross-stage version inconsistencies.
# Multi-stage build for Xamarin.Android ARCore bindings from source
FROM ubuntu:22.04 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install essential tools and JDK and wget
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
openjdk-11-jdk-headless \
wget \
gnupg \
&& rm -rf /var/lib/apt/lists/*
# Install .NET SDK 7.0 via Microsoft's official package (no apt-key)
RUN wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt-get update \
&& apt-get install -y --no-install-recommends dotnet-sdk-7.0 \
&& rm -rf /var/lib/apt/lists/*
# Install Cake tool (global dotnet tool)
RUN dotnet tool install --global Cake.Tool \
&& echo 'export PATH="$PATH:/root/.dotnet/tools"' >> /root/.bashrc
ENV PATH="${PATH}:/root/.dotnet/tools"
WORKDIR /src
COPY . ./
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
# Resolve externals and build libs/nuget
RUN dotnet cake --target=externals
RUN dotnet cake --name=ARCore --target=libs --target=nuget
# Copy artifacts for runtime image
RUN mkdir -p /artifacts/ARCore
RUN cp -r ./output /artifacts/ARCore/
# Stage 2: runtime image (minimal)
FROM debian:bookworm-slim AS runtime
WORKDIR /app
# Copy ARCore artifacts from build stage
COPY --from=build /artifacts/ARCore /app/ARCore
# Default command for debugging
CMD ["bash"]
- Build status: build_failed
- Key concerns
- Dockerfile expects source at /src/Android/ARCore after COPY and an /artifacts/ARCore/output directory produced by Cake; mismatched repo layout or missing artifacts will cause failure.
- Runtime image is a minimal Debian image; may lack system libraries required by ARCore artifacts.
- If /artifacts/ARCore/output is missing or not copied, runtime image will be almost empty; smoke tests may fail.
- COPY --from=build depends on a successful build.
- CMD uses bash for debugging; not ideal for production unless an interactive shell is expected.
- Build error (exact details preserved)
- Exact error message and exit code
- The command could not be loaded, possibly because:
* You intended to execute a .NET application:
The application 'tool' does not exist.
* You intended to execute a .NET SDK command:
No .NET SDKs were found.
Download a .NET SDK:
https://aka.ms/dotnet/download
Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found
- ERROR: process "/bin/sh -c dotnet tool install --global Cake.Tool && echo 'export PATH=\"$PATH:/root/.dotnet/tools\"' >> /root/.bashrc" did not complete successfully: exit code: 145
- Failing command/step
- [build 4/11] RUN dotnet tool install --global Cake.Tool && echo 'export PATH="$PATH:/root/.dotnet/tools"' >> /root/.bashrc
- Missing packages or files mentioned
- No .NET SDKs were found (per the error message)
- The application 'tool' does not exist (dotnet could not locate the Cake.Tool executable as a tool)
- Version mismatch information
- Prior step shows .NET SDK installed: dotnet-sdk-7.0 (7.0.410-1)
- Installed in that step: 7.0.410-1 (dotnet-sdk-7.0)
- Despite this, the runtime error indicates no usable .NET SDKs were found at runtime for the tool install
- Notes
- The error suggests a runtime environment issue where the .NET CLI cannot detect the installed SDKs, or PATH/SDK resolution is not set up during that shell run
- Summary
- Build failed due to Cake.Tool installation failing because the .NET CLI cannot locate usable SDKs at runtime (No .NET SDKs found) and the application 'tool' does not exist. Requires ensuring the .NET SDK is installed, accessible in PATH at build time, and that Cake.Tool is available to install with dotnet tool install --global Cake.Tool. Also verify repository layout (/src/Android/ARCore) and artifact output (/artifacts/ARCore/output).# Multi-stage build for Xamarin.Android ARCore bindings from source
FROM ubuntu:22.04 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install essential tools and JDK and wget
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
openjdk-11-jdk-headless \
wget \
gnupg \
&& rm -rf /var/lib/apt/lists/*
# Install .NET SDK 7.0 via Microsoft's official package (no apt-key)
RUN wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt-get update \
&& apt-get install -y --no-install-recommends dotnet-sdk-7.0 \
&& rm -rf /var/lib/apt/lists/*
# Install Cake tool (global dotnet tool)
RUN dotnet tool install --global Cake.Tool \
&& echo 'export PATH="$PATH:/root/.dotnet/tools"' >> /root/.bashrc
ENV PATH="${PATH}:/root/.dotnet/tools"
WORKDIR /src
COPY . ./
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
# Resolve externals and build libs/nuget
RUN dotnet cake --target=externals
RUN dotnet cake --name=ARCore --target=libs --target=nuget
# Copy artifacts for runtime image
RUN mkdir -p /artifacts/ARCore
RUN cp -r ./output /artifacts/ARCore/
# Stage 2: runtime image (minimal)
FROM debian:bookworm-slim AS runtime
WORKDIR /app
# Copy ARCore artifacts from build stage
COPY --from=build /artifacts/ARCore /app/ARCore
# Default command for debugging
CMD ["bash"]
Summary (under 1500 chars):
- Exact error message and exit code
The command could not be loaded, possibly because:
* You intended to execute a .NET application:
The application 'tool' does not exist.
* You intended to execute a .NET SDK command:
No .NET SDKs were found.
Download a .NET SDK:
https://aka.ms/dotnet/download
Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found
ERROR: failed to build: failed to solve: process "/bin/sh -c dotnet tool install --global Cake.Tool && echo 'export PATH=\"$PATH:/root/.dotnet/tools\"' >> /root/.bashrc" did not complete successfully: exit code: 145
- Failing command/step
Dockerfile:27
[build 4/11] RUN dotnet tool install --global Cake.Tool && echo 'export PATH="$PATH:/root/.dotnet/tools"' >> /root/.bashrc
- Missing packages or files mentioned
No .NET SDKs were found. The log also notes that the application 'tool' does not exist, indicating the environment lacks a suitable .NET SDK/toolset for this command.
- Version mismatch info
The Dockerfile attempts to install dotnet-sdk-7.0 (earlier step), but at runtime the build reports no .NET SDKs found. This indicates the expected 7.0 SDK is not present/visible in the current layer, causing the dotnet tool installation to fail.# Multi-stage build using a .NET SDK base image for ARCore Xamarin.Android bindings
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install required OS tools
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
unzip \
openjdk-11-jdk-headless \
wget \
ca-certificates \
gnupg \
&& rm -rf /var/lib/apt/lists/*
# Install Cake tool (global .NET tool)
RUN dotnet tool install --global cake.tool \
&& echo 'export PATH="$PATH:/root/.dotnet/tools"' >> /root/.bashrc
ENV PATH="${PATH}:/root/.dotnet/tools"
WORKDIR /src
COPY . ./
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
# Fetch externals and build libs/nuget
RUN dotnet cake --target=externals
RUN dotnet cake --name=ARCore --target=libs --target=nuget
# Copy artifacts for runtime image
RUN mkdir -p /artifacts/ARCore
RUN cp -r ./output /artifacts/ARCore/
# Stage 2: runtime image (minimal)
FROM debian:bookworm-slim AS runtime
WORKDIR /app
# Copy ARCore artifacts from build stage
COPY --from=build /artifacts/ARCore /app/ARCore
# Default command for debugging
CMD ["bash"]
# Multi-stage build using Ubuntu 22.04 to build Xamarin.Android ARCore bindings from source
FROM ubuntu:22.04 AS build
ENV DEBIAN_FRONTEND=noninteractive
# Install required build tools and JDK
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
openjdk-11-jdk-headless \
tzdata \
&& rm -rf /var/lib/apt/lists/*
# Install dotnet 7.0 using official install script
RUN curl -sSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh \
&& chmod +x dotnet-install.sh \
&& ./dotnet-install.sh --version 7.0.414 --install-dir /usr/share/dotnet \
&& ln -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet \
&& rm dotnet-install.sh
ENV PATH="/usr/share/dotnet:${PATH}"
# Install Cake tool (dotnet global tool)
RUN dotnet tool install --global Cake.Tool \
&& echo 'export PATH="${PATH}:/root/.dotnet/tools"' >> /root/.bashrc
ENV PATH="${PATH}:/root/.dotnet/tools"
WORKDIR /src
COPY . ./
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
# Resolve externals and build libs/nuget
RUN dotnet cake --target=externals
RUN dotnet cake --name=ARCore --target=libs --target=nuget
# Copy artifacts for runtime image
RUN mkdir -p /artifacts/ARCore
RUN cp -r ./output /artifacts/ARCore/
# Stage 2: runtime image (minimal)
FROM ubuntu:22.04-slim AS runtime
WORKDIR /app
# Copy ARCore artifacts from build stage
COPY --from=build /artifacts/ARCore /app/ARCore
# Default command for debugging
CMD ["bash"]
FROM mcr.microsoft.com/dotnet/sdk:7.0-jammy
# Install dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
openjdk-11-jdk-headless \
curl ca-certificates unzip git \
&& rm -rf /var/lib/apt/lists/*
# Install Cake tool (global)
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
RUN dotnet tool install --global Cake.Tool && \
echo 'export PATH="$PATH:/root/.dotnet/tools"' >> /root/.bashrc
ENV PATH="$PATH:/root/.dotnet/tools"
# Copy source
WORKDIR /src
COPY . /src
# Build ARCore component
WORKDIR /src/Android/ARCore
RUN dotnet cake --version
RUN dotnet cake --target=libs
# Default to an interactive shell
CMD ["/bin/bash"]
FROM ubuntu:22.04
# Non-interactive
ENV DEBIAN_FRONTEND=noninteractive
# Install essential tools
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates curl unzip git openjdk-11-jdk-headless && \
rm -rf /var/lib/apt/lists/*
# Install .NET SDK 7.0 via dotnet-install script to ensure compatibility on Ubuntu 22.04
RUN mkdir -p /tmp/dotnet_install && \
cd /tmp/dotnet_install && \
curl -fsSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh -v 7.0.402 --install-dir /usr/share/dotnet --runtime-tools && \
ln -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet && \
rm -rf /tmp/dotnet_install
ENV DOTNET_ROOT=/usr/share/dotnet
ENV PATH="$PATH:/usr/share/dotnet"
ENV PATH="$PATH:/root/.dotnet/tools"
# Install Cake as a global tool
RUN dotnet tool install --global Cake.Tool && \
echo 'export PATH="$PATH:/root/.dotnet/tools"' >> /root/.bashrc
# Copy source code
WORKDIR /src
COPY . /src
# Build ARCore component (from its folder)
WORKDIR /src/Android/ARCore
RUN dotnet cake --version
RUN dotnet cake --target=libs
# Default to a shell
CMD ["/bin/bash"]
Exact error and context - Error message and exit code: - dotnet_install: Error: Unknown argument `--runtime-tools` - Exit code: 1 - Failing command/step: - RUN mkdir -p /tmp/dotnet_install && cd /tmp/dotnet_install && curl -fsSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh && chmod +x dotnet-install.sh && ./dotnet-install.sh -v 7.0.402 --install-dir /usr/share/dotnet --runtime-tools && ln -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet && rm -rf /tmp/dotnet_install Missing packages or files mentioned - Warning during apt install: - head: cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or directory - No explicit missing packages listed; apt-get proceeded to install many packages and completed, but the cacerts warning indicates a missing CACerts file temporarily during ca-certificates-java setup. Version mismatch / relevant info - The script dotnet-install.sh was invoked with: - -v 7.0.402 --install-dir /usr/share/dotnet --runtime-tools - The error indicates the flag --runtime-tools is not recognized by the installed/delivered dotnet-install.sh version, suggesting a version/flag mismatch between the script and the requested runtime-tools option for .NET 7.0.402.
FROM mcr.microsoft.com/dotnet/sdk:7.0-jammy
# Install system dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
build-essential \
openjdk-11-jdk-headless && \
rm -rf /var/lib/apt/lists/*
# Enable the dotnet tools path for Cake
ENV PATH="$PATH:/root/.dotnet/tools"
# Install Cake tool globally
RUN dotnet tool install --global Cake.Tool
# Copy source code
WORKDIR /src
COPY . /src
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
RUN dotnet cake --version
RUN dotnet cake --target=libs
# Optional: build NuGet packages and samples (commented out to keep build time smaller by default)
# RUN dotnet cake --target=nuget
# RUN dotnet cake --target=samples
# Default to a bash shell
CMD ["/bin/bash"]
FROM ubuntu:22.04
# Non-interactive
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
build-essential \
openjdk-11-jdk-headless \
ca-certificates \
tzdata && \
rm -rf /var/lib/apt/lists/*
# Install .NET 7.0 SDK via dotnet-install script
RUN mkdir -p /tmp/dotnet_install && \
cd /tmp/dotnet_install && \
curl -fsSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh -v 7.0.402 --install-dir /usr/share/dotnet && \
ln -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet && \
rm -rf /tmp/dotnet_install
ENV DOTNET_ROOT=/usr/share/dotnet
ENV PATH="$PATH:/usr/share/dotnet"
# Install Cake as a global tool
RUN dotnet tool install --global Cake.Tool
ENV PATH="$PATH:/root/.dotnet/tools"
# Copy source code
WORKDIR /src
COPY . /src
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
RUN dotnet cake --version
RUN dotnet cake --target=libs
# Default to a bash shell
CMD ["/bin/bash"]
- Failing step [4/9]: RUN dotnet tool install --global Cake.Tool - Error: Process terminated. Couldn't find a valid ICU package installed on the system. Please install libicu (or icu-libs) using your package manager and try again. Alternatively set System.Globalization.Invariant to true to run with no globalization support. See https://aka.ms/dotnet-missing-libicu for more info. - Aborted (core dumped) - ERROR: process "/bin/sh -c dotnet tool install --global Cake.Tool" did not complete successfully: exit code: 134 - Context / version info: - Preceding step installed .NET 7.0.402 (steps [3/9] and [7/9]); failure occurs when installing Cake.Tool. - Error indicates missing ICU library, not a .NET version mismatch. - Missing packages/files: - libicu (or icu-libs) missing; install via package manager. Guidance at https://aka.ms/dotnet-missing-libicu - Version/mismatch notes: - No explicit version mismatch; .NET 7.0.402 installed; issue is ICU availability.
FROM ubuntu:22.04
# Non-interactive
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
build-essential \
openjdk-11-jdk-headless \
tzdata && \
# Install an ICU library (try common package names across distros)
mkdir -p /tmp/icu && \
bash -lc '
ICU_PKG=
if apt-cache show libicu66 >/dev/null 2>&1; then echo libicu66; \
elif apt-cache show libicu70 >/dev/null 2>&1; then echo libicu70; \
else echo ""; fi
' >/tmp/icu/choose && \
ICU_PKG=$(cat /tmp/icu/choose) && \
if [ -n "$ICU_PKG" ]; then apt-get install -y --no-install-recommends "$ICU_PKG"; else echo "No suitable ICU package found"; exit 1; fi && \
rm -rf /var/lib/apt/lists/* /tmp/icu
# Enable the dotnet tools path for Cake
ENV PATH="${PATH}:/root/.dotnet/tools"
# Install .NET 7.0 SDK via dotnet-install script
RUN mkdir -p /tmp/dotnet_install && \
cd /tmp/dotnet_install && \
curl -fsSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh -v 7.0.402 --install-dir /usr/share/dotnet && \
ln -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet && \
rm -rf /tmp/dotnet_install
ENV DOTNET_ROOT=/usr/share/dotnet
ENV PATH="$PATH:/usr/share/dotnet"
# Install Cake as a global tool
RUN dotnet tool install --global Cake.Tool
# Make sure root can access the dotnet tools path
ENV PATH="$PATH:/root/.dotnet/tools"
# Copy source code
WORKDIR /src
COPY . /src
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
RUN dotnet cake --version
RUN dotnet cake --target=libs
# Default to a bash shell
CMD ["/bin/bash"]
#0 building with "default" instance using docker driver #1 [internal] load build definition from Dockerfile #1 transferring dockerfile: 1.88kB done #1 DONE 0.0s Dockerfile:19 -------------------- 17 | mkdir -p /tmp/icu && \ 18 | bash -lc ' 19 | >>> ICU_PKG= 20 | if apt-cache show libicu66 >/dev/null 2>&1; then echo libicu66; \ 21 | elif apt-cache show libicu70 >/dev/null 2>&1; then echo libicu70; \ -------------------- ERROR: failed to build: failed to solve: dockerfile parse error on line 19: unknown instruction: ICU_PKG=
FROM ubuntu:22.04
# Non-interactive
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
build-essential \
openjdk-11-jdk-headless \
libicu66 \
tzdata && \
rm -rf /var/lib/apt/lists/*
# Install .NET 7.0 SDK via dotnet-install script
RUN mkdir -p /tmp/dotnet_install && \
cd /tmp/dotnet_install && \
curl -fsSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh -v 7.0.402 --install-dir /usr/share/dotnet && \
ln -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet && \
rm -rf /tmp/dotnet_install
ENV DOTNET_ROOT=/usr/share/dotnet
ENV PATH="$PATH:/usr/share/dotnet"
# Install Cake as a global tool
RUN dotnet tool install --global Cake.Tool
ENV PATH="$PATH:/root/.dotnet/tools"
# Copy source code
WORKDIR /src
COPY . /src
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
RUN dotnet cake --version
RUN dotnet cake --target=libs
# Default to a bash shell
CMD ["/bin/bash"]
Summary of Docker build error - Exact error message and exit code: - E: Unable to locate package libicu66 - Exit code: 100 - Failing command/step: - [2/9] RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ca-certificates curl unzip git build-essential openjdk-11-jdk-headless libicu66 tzdata && rm -rf /var/lib/apt/lists/* - Dockerfile:7 - Missing packages or files mentioned: - libicu66 (Unable to locate package libicu66) - Version mismatch information: - Base image: ubuntu:22.04 with digest @sha256:ce4a593b4e323dcc3dd728e397e0a866a1bf516a1b7c31d6aa06991baec4f2e0 (Jammy) - No explicit version mismatch reported; the failure is due to libicu66 not being locatable in the apt repositories for this image.
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Basic system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
build-essential \
openjdk-11-jdk-headless \
tzdata && \
rm -rf /var/lib/apt/lists/*
# Install .NET 7 SDK via dotnet-install script (latest 7.x channel)
RUN mkdir -p /tmp/dotnet_install && \
cd /tmp/dotnet_install && \
curl -fsSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh -Channel 7.0 -InstallDir /usr/share/dotnet && \
ln -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet && \
rm -rf /tmp/dotnet_install
ENV DOTNET_ROOT=/usr/share/dotnet
ENV PATH="$PATH:/usr/share/dotnet"
# Disable ICU globalization requirements to simplify container
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true
# Install Cake as a global tool
RUN dotnet tool install --global Cake.Tool
ENV PATH="$PATH:/root/.dotnet/tools"
# Copy source code
WORKDIR /src
COPY . /src
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
RUN dotnet cake --version
RUN dotnet cake --target=libs
# Optional: you can build nuget packages and samples later
# RUN dotnet cake --target=nuget
# RUN dotnet cake --target=samples
# Default to a bash shell
CMD ["/bin/bash"]
- Failing step: Step: [4/9] RUN dotnet tool install --global Cake.Tool - Exit code: 1 - Failing command: dotnet tool install --global Cake.Tool - Exact error and context (NU1202 block preserved exactly): NU1202: Package Cake.Tool 6.1.0 is not compatible with net7.0 (.NETCoreApp,Version=v7.0) / any. Package Cake.Tool 6.1.0 supports: - net10.0 (.NETCoreApp,Version=v10.0) / any - net8.0 (.NETCoreApp,Version=v8.0) / any - net9.0 (.NETCoreApp,Version=v9.0) / any The tool package could not be restored. Tool 'cake.tool' failed to install. This failure may have been caused by: * You are attempting to install a preview release and did not use the --version option to specify the version. * A package by this name was found, but it was not a .NET tool. * The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem. * You mistyped the name of the tool. For more reasons, including package naming enforcement, visit https://aka.ms/failure-installing-tool This corresponds to the final error line: ERROR: process "/bin/sh -c dotnet tool install --global Cake.Tool" did not complete successfully: exit code: 1 - Version/mismatch details: - The build uses .NET SDK version 7.0.410 (SDK Version: 7.0.410). - Cake.Tool 6.1.0 is not compatible with net7.0; it only supports net8.0, net9.0, net10.0. - This is a target/framework mismatch: net7.0 is being targeted while Cake.Tool 6.1.0 requires a newer TFMs. - Missing packages/files: None explicitly missing; issue is framework compatibility. - Quick fixes: - Update the project to a compatible .NET target (e.g., net8.0 or higher) or install a Cake.Tool version compatible with net7.0 (if available). - Alternatively, specify a compatible Cake.Tool version via --version, or adjust the Docker image to use a matching .NET target.
No results found.
How to Bake a Cake from Scratch - Food Network https://www.foodnetwork.com/recipes/packages/baking-guide/crowd-pleasing-cakes/crowd-pleasing-cakes Feb 4, 2025 · When it comes to desserts, cakes get all the attention — and for good reason! Towering layer cakes, frosted sheet cakes, buttery Bundt cakes, candle-topped birthday cakes: what’s not to Cake Recipes - Food Network https://www.foodnetwork.com/topics/cake 3 days ago · Make birthdays, holidays or any get-together a little sweeter with top-rated cake recipes from Food Network chefs. Cake Recipes | Food Network https://www.foodnetwork.com/recipes/dessert/cake Turn any occasion into a celebration with these cake recipes from Food Network. You'll find options for chocolate cake, carrot cake, confetti birthday cakes and even more. Blueberry Crisp Dump Cake Recipe | Ree Drummond | Food Network https://www.foodnetwork.com/recipes/ree-drummond/blueberry-crisp-dump-cake-21429655 Deselect All Cake Base: One 14-ounce can blueberry pie filling 2 cup fresh blueberries One 13.25-ounce box vanilla cake mix 12 tablespoons salted butter Crisp Topping: 1 cup all-purpose flour 1 ... How to Bake a Cake: A Step-by-Step Guide - Food Network https://www.foodnetwork.com/how-to/articles/how-to-bake-a-cake-a-step-by-step-guide Apr 24, 2015 · Follow this easy guide for mixing, prepping and baking a cake, then watch our how-to video.
FROM mcr.microsoft.com/dotnet/sdk:7.0-jammy
ENV DEBIAN_FRONTEND=noninteractive
# Basic system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
build-essential \
openjdk-11-jdk-headless \
tzdata && \
rm -rf /var/lib/apt/lists/*
# Enable .NET tools path
ENV PATH="$PATH:/root/.dotnet/tools"
# Install Cake as a global tool (use a version compatible with net7.0)
RUN dotnet tool install --global Cake.Tool --version 5.6.0
# Copy source code
WORKDIR /src
COPY . /src
# Build ARCore component from its folder
WORKDIR /src/Android/ARCore
RUN dotnet cake --version
RUN dotnet cake --target=libs
# Default to a bash shell
CMD ["/bin/bash"]
No results found.
FROM mcr.microsoft.com/dotnet/sdk:7.0-jammy
# Install system dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
openjdk-11-jdk-headless \
build-essential && \
rm -rf /var/lib/apt/lists/*
# Enable global tool path for dotnet
ENV PATH="${PATH}:/root/.dotnet/tools"
# Install Cake tool (version compatible with .NET 7)
RUN dotnet tool install --global Cake.Tool --version 5.6.0
# Copy source code
WORKDIR /src
COPY . /src
# Build ARCore component
WORKDIR /src/Android/ARCore
RUN dotnet cake --version
RUN dotnet cake --target=libs
# Default to a bash shell
CMD ["/bin/bash"]
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Install required system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
build-essential \
openjdk-11-jdk-headless \
tzdata && \
rm -rf /var/lib/apt/lists/*
# Install .NET 7 via dotnet-install script (Channel 7.0)
RUN mkdir -p /tmp/dotnet_install && \
cd /tmp/dotnet_install && \
curl -fsSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh -Channel 7.0 -InstallDir /usr/share/dotnet && \
ln -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet && \
rm -rf /tmp/dotnet_install
ENV DOTNET_ROOT=/usr/share/dotnet
ENV PATH="$PATH:/usr/share/dotnet"
# Install Cake tool (version compatible with .NET 7.0)
RUN dotnet tool install --global Cake.Tool --version 5.6.0
ENV PATH="$PATH:/root/.dotnet/tools"
# Copy source code
WORKDIR /src
COPY . /src
# Build ARCore component (Android/ARCore)
WORKDIR /src/Android/ARCore
RUN dotnet cake --version
RUN dotnet cake --target=libs
# Default to a bash shell
CMD ["/bin/bash"]
- Failing step: [4/9] RUN dotnet tool install --global Cake.Tool --version 5.6.0 - Exit code: 134 - Exact error message (core issue): Process terminated. Couldn't find a valid ICU package installed on the system. Please install libicu (or icu-libs) using your package manager and try again. Alternatively you can set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. Please see https://aka.ms/dotnet-missing-libicu for more information. Aborted (core dumped) - Missing packages or files mentioned: libicu (or icu-libs) - Version mismatch / context details: - Tool version being installed: Cake.Tool --version 5.6.0 - .NET runtime setup preceding this step: dotnet installed via dotnet-install.sh (Channel 7.0) to /usr/share/dotnet, with /usr/local/bin/dotnet symlink created - Base image: Ubuntu 22.04 - Notes: - The error arises due to missing ICU libraries needed by .NET globalization features, not a syntax/command issue in the Dockerfile. - Potential fix: install libicu (or icu-libs) in the image before this step, or enable invariant globalization as a temporary workaround.
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Install required system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
build-essential \
libicu66 \
openjdk-11-jdk-headless \
tzdata && \
rm -rf /var/lib/apt/lists/*
# Install .NET 7 via dotnet-install script (Channel 7.0)
RUN mkdir -p /tmp/dotnet_install && \
cd /tmp/dotnet_install && \
curl -fsSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh -Channel 7.0 -InstallDir /usr/share/dotnet && \
ln -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet && \
rm -rf /tmp/dotnet_install
ENV DOTNET_ROOT=/usr/share/dotnet
ENV PATH="${PATH}:/usr/share/dotnet"
# Install Cake tool (version compatible with .NET 7.0)
RUN dotnet tool install --global Cake.Tool --version 5.6.0
ENV PATH="${PATH}:/root/.dotnet/tools"
# Copy source code
WORKDIR /src
COPY . /src
# Build ARCore component (Android/ARCore)
WORKDIR /src/Android/ARCore
RUN dotnet cake --version
RUN dotnet cake --target=libs
# Default to a bash shell
CMD ["/bin/bash"]
- Exact error message and exit code - E: Unable to locate package libicu66 - exit code: 100 - Failing command/step - RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl unzip git build-essential libicu66 openjdk-11-jdk-headless tzdata && rm -rf /var/lib/apt/lists/* - Missing packages or files mentioned - libicu66 - Version mismatch info - No explicit version mismatch in the logs. The failure indicates that libicu66 is not available in the jammy (Ubuntu 22.04) apt repositories used by this build.
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Install required system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
git \
build-essential \
openjdk-11-jdk-headless \
tzdata && \
rm -rf /var/lib/apt/lists/*
# Install .NET 7 via dotnet-install script (Channel 7.0)
RUN mkdir -p /tmp/dotnet_install && \
cd /tmp/dotnet_install && \
curl -fsSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh && \
chmod +x dotnet-install.sh && \
./dotnet-install.sh -Channel 7.0 -InstallDir /usr/share/dotnet && \
ln -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet && \
rm -rf /tmp/dotnet_install
ENV DOTNET_ROOT=/usr/share/dotnet
ENV PATH="${PATH}:/usr/share/dotnet"
# Disable ICU/globalization requirements to simplify container
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true
# Install Cake as a global tool compatible with .NET 7
RUN dotnet tool install --global Cake.Tool --version 5.6.0
ENV PATH="${PATH}:/root/.dotnet/tools"
# Copy source code
WORKDIR /src
COPY . /src
# Build ARCore component (Android/ARCore)
WORKDIR /src/Android/ARCore
RUN dotnet cake --version
RUN dotnet cake --target=libs
# Default to a bash shell
CMD ["/bin/bash"]
FROM mcr.microsoft.com/dotnet/sdk:7.0-ubuntu22.04
# Configure build environment
ENV DOTNET_CLI_TELEMETRY_OPTOFF=1 \
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Install required system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
unzip \
zip \
build-essential \
cmake \
openjdk-11-jdk \
libicu70 \
&& rm -rf /var/lib/apt/lists/*
# Prepare source
WORKDIR /src
COPY . /src
# Install Cake tool for building the repository
RUN dotnet tool install --global Cake.Tool
# Ensure Cake is on PATH
ENV PATH="$PATH:/root/.dotnet/tools"
# Build the ARCore component (and related components) from source
RUN dotnet cake Android/ARCore/build.cake --target=ci
# Start with an interactive shell to allow further commands if needed
CMD ["/bin/bash"]
FROM mcr.microsoft.com/dotnet/sdk:7.0
# Basic .NET SDK environment setup
ENV DOTNET_CLI_TELEMETRY_OPTOFF=1 \
DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
# Install required system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
unzip \
zip \
build-essential \
cmake \
openjdk-11-jdk && \
rm -rf /var/lib/apt/lists/*
# Prepare source
WORKDIR /src
COPY . /src
# Install Cake tool for building the repository
RUN dotnet tool install --global Cake.Tool
# Ensure Cake is on PATH for convenience
ENV PATH="$PATH:/root/.dotnet/tools"
# Build the ARCore component (and related components) from source
RUN dotnet cake Android/ARCore/build.cake --target=ci
# Start with an interactive shell to allow further commands if needed
CMD ["/bin/bash"]
FROM ubuntu:22.04
# Non-interactive frontend
ENV DEBIAN_FRONTEND=noninteractive
# Install prerequisites and .NET SDK 7.0 from Microsoft package feed
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
lsb-release \
unzip \
zip \
build-essential \
cmake \
openjdk-11-jdk \
libicu70 \
&& rm -rf /var/lib/apt/lists/*
# Install .NET SDK 7.0 from Microsoft packages for Ubuntu 22.04
RUN curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -o packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
rm packages-microsoft-prod.deb && \
apt-get update && \
apt-get install -y --no-install-recommends dotnet-sdk-7.0 && \
rm -rf /var/lib/apt/lists/*
# Prepare build context
WORKDIR /src
COPY . /src
# Install Cake tool (global)
RUN dotnet tool install --global Cake.Tool --version 5.6.0 && \
echo 'export PATH=$PATH:/root/.dotnet/tools' >> /root/.bashrc
ENV PATH="$PATH:/root/.dotnet/tools"
# Build ARCore component from source
RUN dotnet cake Android/ARCore/build.cake --target=ci
CMD ["/bin/bash"]
Docker build error summary
- Exact error message and exit code
The command could not be loaded, possibly because:
* You intended to execute a .NET application:
The application 'tool' does not exist.
* You intended to execute a .NET SDK command:
No .NET SDKs were found.
Download a .NET SDK:
https://aka.ms/dotnet/download
Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found
Exit code: 145
- Failing command/step
Dockerfile step: RUN dotnet tool install --global Cake.Tool --version 5.6.0 && echo 'export PATH=$PATH:/root/.dotnet/tools' >> /root/.bashrc
(Step [6/7] in the log)
- Missing packages or files mentioned
- The application 'tool' does not exist. (indicating the dotnet CLI attempted to load a non-existent application)
- No .NET SDKs were found. (indicating the dotnet tool cannot locate a usable SDK)
- Version mismatch information
- Cake.Tool requested: 5.6.0
- .NET SDKs installed earlier in the build: dotnet-sdk-7.0 (installed in a prior step)
- No explicit version mismatch noted in the log; the failure is due to the dotnet tooling not being loadable at that moment (SDK not found/application missing) rather than a clearly stated version mismatch.FROM mcr.microsoft.com/dotnet/sdk:7.0
# Non-interactive install
ENV DEBIAN_FRONTEND=noninteractive
# Install required system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
unzip \
zip \
build-essential \
cmake \
openjdk-11-jdk \
libicu70 && \
rm -rf /var/lib/apt/lists/*
# Build context
WORKDIR /src
COPY . /src
# Install Cake tool globally
RUN dotnet tool install --global Cake.Tool
# Ensure Cake is on PATH
ENV PATH="$PATH:/root/.dotnet/tools"
# Build the ARCore component and related components from source
RUN dotnet cake Android/ARCore/build.cake --target=ci
# Default to a shell
CMD ["/bin/bash"]
FROM ubuntu:22.04
# Non-interactive frontend
ENV DEBIAN_FRONTEND=noninteractive
# Install prerequisites and .NET SDK 7.0 from Microsoft package feed
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
unzip \
zip \
build-essential \
cmake \
openjdk-11-jdk \
libicu70 \
&& rm -rf /var/lib/apt/lists/*
# Install .NET 7 SDK for Ubuntu 22.04 from Microsoft package feed
RUN curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -o packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
rm -f packages-microsoft-prod.deb && \
apt-get update && \
apt-get install -y --no-install-recommends dotnet-sdk-7.0 && \
rm -rf /var/lib/apt/lists/*
# Prepare build context
WORKDIR /src
COPY . /src
# Install Cake tool globally
RUN dotnet tool install --global Cake.Tool
# Ensure Cake is on PATH
ENV PATH="$PATH:/root/.dotnet/tools"
# Build the ARCore component and related components from source
RUN dotnet cake Android/ARCore/build.cake --target=ci
# Default to a shell
CMD ["/bin/bash"]
- Exact error message and exit code
- exit code: 145
- The command could not be loaded, possibly because:
- You intended to execute a .NET application:
The application 'tool' does not exist.
- You intended to execute a .NET SDK command:
No .NET SDKs were found.
-
- Download a .NET SDK:
https://aka.ms/dotnet/download
- Learn about SDK resolution:
https://aka.ms/dotnet/sdk-not-found
- Failing command/step
- RUN dotnet tool install --global Cake.Tool
- Stage: [6/7] in Dockerfile (line 33 in the snippet)
- Missing packages/files mentioned
- No .NET SDKs were found (runtime could not locate a .NET SDK)
- The log also notes: The application 'tool' does not exist (inference for attempting a .NET app instead of a CLI tool)
- Version/mismatch info
- Prior step installs .NET SDKs (dotnet-sdk-7.0) as part of the image: example lines show dotnet-sdk-7.0 being installed (7.0.410-1 for amd64)
- Despite installing dotnet-sdk-7.0 earlier in the build, the dotnet tool install step cannot detect an SDK at runtime, leading to exit code 145 and the “No .NET SDKs were found” message.FROM mcr.microsoft.com/dotnet/sdk:7.0
# Non-interactive frontend
ENV DEBIAN_FRONTEND=noninteractive
# Install required system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
unzip \
zip \
build-essential \
cmake \
openjdk-11-jdk \
libicu70 && \
rm -rf /var/lib/apt/lists/*
# Prepare build context
WORKDIR /src
COPY . /src
# Verify dotnet is available
RUN dotnet --version
# Install Cake tool globally (specific version for compatibility)
RUN dotnet tool install --global Cake.Tool --version 5.6.0
# Ensure Cake is on PATH
ENV PATH="$PATH:/root/.dotnet/tools"
# Build the ARCore component and related components from source
RUN dotnet cake Android/ARCore/build.cake --target=ci
# Default to a shell
CMD ["/bin/bash"]
FROM ubuntu:22.04
# Non-interactive frontend
ENV DEBIAN_FRONTEND=noninteractive
# Install prerequisites
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
unzip \
zip \
build-essential \
cmake \
openjdk-11-jdk \
libicu70 \
&& rm -rf /var/lib/apt/lists/*
# Install .NET 7 SDK via official dotnet-install script (standalone) to avoid relying on distro packages
RUN curl -sSL https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh -o dotnet-install.sh && \
bash dotnet-install.sh --channel 7.0 --install-dir /usr/share/dotnet --version 7.0.410 && \
rm dotnet-install.sh
# Create a symlink for dotnet binary
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
# Prepare build context
WORKDIR /src
COPY . /src
# Install Cake tool globally
RUN dotnet tool install --global Cake.Tool --version 5.6.0
# Ensure Cake is on PATH
ENV PATH="${PATH}:/root/.dotnet/tools"
# Build the ARCore component and related components from source
RUN dotnet cake Android/ARCore/build.cake --target=ci
# Default to a shell
CMD ["/bin/bash"]
Summary:
- Exact error message and exit code
- ERROR: failed to build: failed to solve: process "/bin/sh -c dotnet tool install --global Cake.Tool --version 5.6.0" did not complete successfully: exit code: 1
- Failing command/step
- [7/8] RUN dotnet tool install --global Cake.Tool --version 5.6.0
- Missing packages or files mentioned
- restore depends on Cake.Tool (>= 5.6.0) but Cake.Tool 5.6.0 was not found. An approximate best match of Cake.Tool 6.0.0 was resolved.
- Package Cake.Tool 6.0.0 is not compatible with net7.0 (.NETCoreApp,Version=v7.0) / any. Package Cake.Tool 6.0.0 supports:
- net10.0 (.NETCoreApp,Version=v10.0) / any
- net8.0 (.NETCoreApp,Version=v8.0) / any
- net9.0 (.NETCoreApp,Version=v9.0) / any
- The tool package could not be restored.
- The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
- The tool could not be installed; possible causes listed include: attempting to install a preview without --version, non-tool package name, or network issue.
- Version mismatch info
- The build uses .NET SDK 7.0.x (SDK Version: 7.0.410).
- Cake.Tool 6.0.0 is only compatible with net10.0, net8.0, net9.0, not net7.0, explaining the incompatibility with the requested Cake.Tool 5.6.0 target of net7.0.FROM ubuntu:22.04
# Non-interactive frontend
ENV DEBIAN_FRONTEND=noninteractive
# Install prerequisites
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
unzip \
zip \
build-essential \
cmake \
openjdk-11-jdk \
libicu70 \
&& rm -rf /var/lib/apt/lists/*
# Install .NET 7 SDK via official dotnet-install script (standalone) to avoid distro packaging issues
RUN curl -sSL https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh -o dotnet-install.sh && \
bash dotnet-install.sh --channel 7.0 --install-dir /usr/share/dotnet --version 7.0.410 && \
rm dotnet-install.sh
# Create a symlink for dotnet binary
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
# Prepare build context
WORKDIR /src
COPY . /src
# Verify dotnet is available
RUN dotnet --version
# Install Cake tool compatible with .NET 7 (explicit version)
RUN dotnet tool install --global Cake.Tool --version 5.5.0
# Ensure Cake is on PATH
ENV PATH="${PATH}:/root/.dotnet/tools"
# Build the ARCore component and related components from source
RUN dotnet cake Android/ARCore/build.cake --target=ci
# Default to a shell
CMD ["/bin/bash"]
- VerifyBuild status: build_failed
- Concerns:
- COPY . /src copies the entire build context; create a .dockerignore to reduce image size/time.
- Build relies on Android/ARCore/build.cake path; if path/script changes, image may fail; validate/parametrize path.
- No non-root user; builds run as root (security issue for production).
- Failing command/step:
- Dockerfile: RUN dotnet tool install --global Cake.Tool --version 5.5.0 (Dockerfile: line 36)
- Exact errors and exit details:
- 4.680 .../restore.csproj : warning NU1603: restore depends on Cake.Tool (>= 5.5.0) but Cake.Tool 5.5.0 was not found. An approximate best match of Cake.Tool 6.0.0 was resolved.
- 4.795 .../restore.csproj : error NU1202: Package Cake.Tool 6.0.0 is not compatible with net7.0 (.NETCoreApp,Version=v7.0) / any. Cake.Tool 6.0.0 supports net10.0, net8.0, net9.0.
- 4.924 The tool package could not be restored.
- 4.924 Tool 'cake.tool' failed to install. Possible causes:
- You are attempting to install a preview release and did not use --version to specify the version.
- A package by this name was found, but it was not a .NET tool.
- The required NuGet feed cannot be accessed (Internet issue).
- You mistyped the tool name.
- Missing packages/files:
- Cake.Tool 5.5.0 was not found; approximate best match Cake.Tool 6.0.0 was resolved.
- Cake.Tool 6.0.0 is not compatible with net7.0 (target framework).
- Version mismatch details:
- Build uses SDK 7.0.x (dotnet --version shows 7.0.410).
- Cake.Tool 6.0.0 supports net10.0, net8.0, net9.0, not net7.0 -> NU1202 incompatibility.
- Exit code:
- Command exit code: 1 (the step failed with “exit code: 1”).FROM mcr.microsoft.com/dotnet/sdk:6.0
# Non-interactive frontend
ENV DEBIAN_FRONTEND=noninteractive
# System dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
unzip \
zip \
build-essential \
cmake \
openjdk-11-jdk \
libicu70 && \
rm -rf /var/lib/apt/lists/*
# Prepare build context
WORKDIR /src
COPY . /src
# Verify dotnet availability
RUN dotnet --version
# Install Cake tool globally (compatible with .NET 6)
RUN dotnet tool install --global Cake.Tool --version 5.6.0
# Ensure Cake is on PATH
ENV PATH="${PATH}:/root/.dotnet/tools"
# Build the ARCore component and related components from source
RUN dotnet cake Android/ARCore/build.cake --target=ci
# Default to a shell
CMD ["/bin/bash"]
FROM mcr.microsoft.com/dotnet/sdk:7.0
# Non-interactive frontend
ENV DEBIAN_FRONTEND=noninteractive
# System dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
unzip \
zip \
build-essential \
cmake \
openjdk-11-jdk \
libicu70 && \
rm -rf /var/lib/apt/lists/*
# Prepare build context
WORKDIR /src
COPY . /src
# Verify dotnet availability
RUN dotnet --version
# Install Cake tool globally (compatible with .NET 7)
RUN dotnet tool install --global Cake.Tool --version 5.6.0
# Ensure Cake is on PATH
ENV PATH="${PATH}:/root/.dotnet/tools"
# Build the ARCore component and related components from source
RUN dotnet cake Android/ARCore/build.cake --target=ci
# Default to a shell
CMD ["/bin/bash"]
FROM mcr.microsoft.com/dotnet/sdk:6.0
# Non-interactive
ENV DEBIAN_FRONTEND=noninteractive
# Install dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
unzip \
zip \
build-essential \
cmake \
openjdk-11-jdk \
libicu70 \
&& rm -rf /var/lib/apt/lists/*
# Prepare build context
WORKDIR /src
COPY . /src
# Ensure dotnet is available
RUN dotnet --version
# Install Cake tool compatible with .NET 6
RUN dotnet tool install --global Cake.Tool --version 5.6.0
# Add Cake to PATH
ENV PATH="${PATH}:/root/.dotnet/tools"
# Build ARCore component from source
RUN dotnet cake Android/ARCore/build.cake --target=ci
# Default to a shell
CMD ["/bin/bash"]
FROM mcr.microsoft.com/dotnet/sdk:6.0
# Non-interactive frontend
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
unzip \
zip \
build-essential \
cmake \
openjdk-11-jdk \
libicu70 \
&& rm -rf /var/lib/apt/lists/*
# Prepare build context
WORKDIR /src
COPY . /src
# Verify dotnet is available
RUN dotnet --version
# Install Cake tool compatible with .NET 6
RUN dotnet tool install --global Cake.Tool --version 5.6.0
# Ensure Cake is on PATH
ENV PATH="${PATH}:/root/.dotnet/tools"
# Build the ARCore component from source
RUN dotnet cake Android/ARCore/build.cake --target=ci
# Default to a shell
CMD ["/bin/bash"]
FROM ubuntu:22.04
# Non-interactive
ENV DEBIAN_FRONTEND=noninteractive
# Install system prerequisites
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
unzip \
zip \
build-essential \
cmake \
openjdk-11-jdk \
libicu70 \
&& rm -rf /var/lib/apt/lists/*
# Install .NET 6.0 SDK using official dotnet-install script
RUN curl -sSL https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh -o dotnet-install.sh && \
bash dotnet-install.sh --channel 6.0 --install-dir /usr/share/dotnet --version 6.0.412 && \
rm dotnet-install.sh
# Create symlink for dotnet
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
# Build context
WORKDIR /src
COPY . /src
# Verify dotnet
RUN dotnet --version
# Install Cake tool compatible with .NET 6
RUN dotnet tool install --global Cake.Tool --version 5.6.0
# Add Cake to PATH
ENV PATH="${PATH}:/root/.dotnet/tools"
# Build ARCore component from source
RUN dotnet cake Android/ARCore/build.cake --target=ci
# Default to a shell
CMD ["/bin/bash"]
Summary of Docker build error Failing command/step - [8/9] RUN dotnet tool install --global Cake.Tool --version 5.6.0 Exact error message and exit code - The tool package could not be restored. - Tool 'cake.tool' failed to install. This failure may have been caused by: - You are attempting to install a preview release and did not use the --version option to specify the version. - A package by this name was found, but it was not a .NET tool. - The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem. - You mistyped the name of the tool. - Exit code: 1 - Final build error indicator: process "/bin/sh -c dotnet tool install --global Cake.Tool --version 5.6.0" did not complete successfully: exit code: 1 Missing packages or files mentioned - NU1603 warning: restore depends on Cake.Tool (>= 5.6.0) but Cake.Tool 5.6.0 was not found. An approximate best match of Cake.Tool 6.0.0 was resolved. Version mismatch and compatibility details - NU1202: Package Cake.Tool 6.0.0 is not compatible with net6.0 (.NETCoreApp,Version=v6.0) / any. Package Cake.Tool 6.0.0 supports: - net10.0 - net8.0 - net9.0 This reveals a target framework mismatch: Cake.Tool 6.0.0 does not support net6.0. - Context: The log shows net6.0 target was being used, but the installed/available Cake.Tool version ended up being 6.0.0, which is incompatible with net6.0.
FROM ubuntu:22.04
# Non-interactive frontend
ENV DEBIAN_FRONTEND=noninteractive
# Install system prerequisites
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gnupg \
unzip \
zip \
build-essential \
cmake \
openjdk-11-jdk \
libicu70 \
&& rm -rf /var/lib/apt/lists/*
# Install .NET 6.0 SDK via dotnet-install script to avoid distro packaging issues
RUN curl -sSL https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh -o dotnet-install.sh && \
bash dotnet-install.sh --channel 6.0 --install-dir /usr/share/dotnet --version 6.0.412 && \
rm dotnet-install.sh
# Create symlink for dotnet
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
# Build context
WORKDIR /src
COPY . /src
# Verify dotnet availability
RUN dotnet --version
# Install Cake tool compatible with .NET 6
RUN dotnet tool install --global Cake.Tool --version 5.6.0
# Add Cake to PATH
ENV PATH="${PATH}:/root/.dotnet/tools"
# Build ARCore component from source
RUN dotnet cake Android/ARCore/build.cake --target=ci
# Default to a shell
CMD ["/bin/bash"]
Failing step - [8/9] RUN dotnet tool install --global Cake.Tool --version 5.6.0 (Dockerfile:36) - Exit code: 1 Exact errors and output - NU1603: restore depends on Cake.Tool (>= 5.6.0) but Cake.Tool 5.6.0 was not found. An approximate best match of Cake.Tool 6.0.0 was resolved. - NU1202: Cake.Tool 6.0.0 is not compatible with net6.0 (.NETCoreApp,Version=v6.0) / any. Cake.Tool 6.0.0 supports net10.0, net8.0, net9.0. - The tool package could not be restored. - Tool 'cake.tool' failed to install. Potential causes: - You are attempting to install a preview release and did not use the --version option to specify the version. - A package by this name was found, but it was not a .NET tool. - The required NuGet feed cannot be accessed (Internet issue). - You mistyped the tool name. - Dockerfile context: - 34 | - 35 | # Install Cake tool compatible with .NET 6 - 36 | >>> RUN dotnet tool install --global Cake.Tool --version 5.6.0 - 37 | - 38 | # Add Cake to PATH - Error: failed to build: failed to solve: process "/bin/sh -c dotnet tool install --global Cake.Tool --version 5.6.0" did not complete successfully: exit code: 1 Missing/packages/files mentioned - Cake.Tool 5.6.0 not found (requested); Cake.Tool 6.0.0 resolved as best match but incompatible with target net6.0. - NuGet restore indicates Cake.Tool 6.0.0 is incompatible with net6.0; supports net10.0, net8.0, net9.0 only. Version and SDK context - Target framework: net6.0 - Resolved tool version: Cake.Tool 6.0.0 (not compatible with net6.0) - Attempted tool install version: 5.6.0 - SDK shown: SDK Version: 6.0.412 Impact - Build failed during Cake.Tool installation/restore, causing overall build failure. Recommended next steps (actionable) - Use a Cake.Tool version compatible with net6.0, or upgrade the project to a framework supported by Cake.Tool 6.0.0 (net8.0/9.0/10.0). - Alternatively adjust Dockerfile to target a compatible framework or install a Cake.Tool version that matches the target framework. - Verify NuGet feed accessibility and tool name accuracy if continuing with 5.x/6.x versions.
FROM ubuntu:22.04
# Non-interactive frontend
ENV DEBIAN_FRONTEND=noninteractive
# Core build prerequisites
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
unzip \
zip \
openjdk-11-jdk \
libicu70 \
&& rm -rf /var/lib/apt/lists/*
# Install .NET 8 SDK components via dotnet-install script (standalone)
RUN curl -sSL https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh -o /tmp/dotnet-install.sh && \
bash /tmp/dotnet-install.sh --channel 8.0 --install-dir /usr/share/dotnet && \
rm /tmp/dotnet-install.sh
# Create symlink for dotnet binary
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
# Build context
WORKDIR /src
COPY . /src
# Verify dotnet is available
RUN dotnet --version
# Install Cake tool globally (latest compatible with net8.0)
RUN dotnet tool install --global Cake.Tool
# Add Cake to PATH
ENV PATH="${PATH}:/root/.dotnet/tools"
# Build ARCore component from source
RUN dotnet cake Android/ARCore/build.cake --target=ci
# Default to a shell
CMD ["/bin/bash"]