FROM ubuntu:jammy-20260217
# Non-interactive frontend for apt
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
pkg-config \
libusb-1.0-0-dev \
libgtk-3-dev \
rpm \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy source tree
WORKDIR /src
COPY . .
# Build both Debug and Release configurations
RUN mkdir -p build/Debug && \
cmake -S . -B build/Debug -DCMAKE_BUILD_TYPE=Debug && \
cmake --build build/Debug --target all
RUN mkdir -p build/Release && \
cmake -S . -B build/Release -DCMAKE_BUILD_TYPE=Release && \
cmake --build build/Release --target all
# Default to an interactive shell to inspect the image
CMD ["/bin/bash"]
# Ignore VCS and build artefacts .git .gitignore build/ cfg/ *.o *.a *.so *.exe *.dll .CMakeFiles CMakeFiles CMakeCache.txt CMakeFiles/ doc/ .idea/ .vscode/ *.log *.tmp
- Exact error message and exit code
- CMake Error at CMakeLists.txt:406 (add_subdirectory): add_subdirectory given source "doc/man" which is not an existing directory.
- Exit code: 1
- Failing command/step
- RUN mkdir -p build/Debug && cmake -S . -B build/Debug -DCMAKE_BUILD_TYPE=Debug && cmake --build build/Debug --target all
- Missing packages or files mentioned
- Missing directory referenced by CMake: doc/man (not an existing directory). This is a source-tree issue, not a missing OS package.
- Version mismatch info
- Base images differ in the Dockerfile across stages:
- Step #3 uses ubuntu:22.04@sha256:ce4a593b4e323dcc3dd728e397e0a866a1bf516a1b7c31d6aa06991baec4f2e0
- Step #5 uses ubuntu:jammy-20260217@sha256:ce4a593b4e323dcc3dd728e397e0a866a1bf516a1b7c31d6aa06991baec4f2e0
- This indicates a version/source mismatch between the two build stages, which can lead to inconsistent build environments.# Ignore VCS and build artefacts .git .gitignore build/ cfg/ *.o *.a *.so *.exe *.dll .CMakeFiles CMakeFiles CMakeCache.txt CMakeFiles/ doc/ *.log *.tmp
# Ignore VCS and build artefacts .git .gitignore build/ cfg/ *.o *.a *.so *.exe *.dll .CMakeFiles CMakeFiles CMakeCache.txt CMakeFiles/ *.log *.tmp
# Ignore VCS and build artefacts .git .gitignore build/ cfg/ *.o *.a *.so *.exe *.dll .CMakeFiles CMakeFiles CMakeCache.txt CMakeFiles/ *.log *.tmp
# Ignore VCS and build artefacts .git .gitignore build/ cfg/ *.o *.a *.so *.exe *.dll .CMakeFiles CMakeFiles CMakeCache.txt CMakeFiles/ *.log *.tmp
FROM ubuntu:jammy-20260217
# Non-interactive frontend for apt
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
pkg-config \
libusb-1.0-0-dev \
libgtk-3-dev \
rpm \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy source tree
WORKDIR /src
COPY . .
# Ensure doc/man exists for CMake if missing in context
RUN mkdir -p doc/man && printf '%s
' "cmake_minimum_required(VERSION 3.0)" "project(doc_man_dummy)" "add_custom_target(docman_dummy ALL)" > doc/man/CMakeLists.txt
# Build both Debug and Release configurations
RUN mkdir -p build/Debug && \
cmake -S . -B build/Debug -DCMAKE_BUILD_TYPE=Debug && \
cmake --build build/Debug --target all
RUN mkdir -p build/Release && \
cmake -S . -B build/Release -DCMAKE_BUILD_TYPE=Release && \
cmake --build build/Release --target all
# Default to an interactive shell to inspect the image
CMD ["/bin/bash"]
#0 building with "default" instance using docker driver #1 [internal] load build definition from Dockerfile #1 transferring dockerfile: 1.04kB done #1 DONE 0.0s Dockerfile:24 -------------------- 22 | # Ensure doc/man exists for CMake if missing in context 23 | RUN mkdir -p doc/man && printf '%s 24 | >>> ' "cmake_minimum_required(VERSION 3.0)" "project(doc_man_dummy)" "add_custom_target(docman_dummy ALL)" > doc/man/CMakeLists.txt 25 | 26 | # Build both Debug and Release configurations -------------------- ERROR: failed to build: failed to solve: dockerfile parse error on line 24: unknown instruction: '
FROM ubuntu:jammy-20260217
# Non-interactive frontend for apt
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
pkg-config \
libusb-1.0-0-dev \
libgtk-3-dev \
rpm \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy source tree
WORKDIR /src
COPY . .
# Build both Debug and Release configurations
RUN mkdir -p build/Debug && \
cmake -S . -B build/Debug -DCMAKE_BUILD_TYPE=Debug && \
cmake --build build/Debug --target all
RUN mkdir -p build/Release && \
cmake -S . -B build/Release -DCMAKE_BUILD_TYPE=Release && \
cmake --build build/Release --target all
# Default to an interactive shell to inspect the image
CMD ["/bin/bash"]
FROM ubuntu:jammy-20260217
# Non-interactive frontend for apt
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
pkg-config \
libusb-1.0-0-dev \
libgtk-3-dev \
rpm \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy source tree
WORKDIR /src
COPY . .
# Build both Debug and Release configurations
RUN mkdir -p build/Debug && \
cmake -S . -B build/Debug -DCMAKE_BUILD_TYPE=Debug && \
cmake --build build/Debug --target all
RUN mkdir -p build/Release && \
cmake -S . -B build/Release -DCMAKE_BUILD_TYPE=Release && \
cmake --build build/Release --target all
# Default to an interactive shell to inspect the image
CMD ["/bin/bash"]
Smoke [PASS]: test -d build/Debug && test -d build/Release Smoke [PASS]: test -f build/Debug/CMakeCache.txt && test -f build/Release/CMakeCache.txt Smoke [PASS]: test -d build/Debug/CMakeFiles && test -d build/Release/CMakeFiles