# Stage 1: Build webview from source (Ubuntu 22.04)
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config \
libgtk-4-dev libwebkitgtk-6.0-dev \
libgl1-mesa-dev libx11-dev ca-certificates \
curl python3
# Copy source
WORKDIR /src
COPY . .
# Build
RUN mkdir -p build && cd build && \
cmake -G Ninja \
-DWEBVIEW_BUILD=ON \
-DCMAKE_BUILD_TYPE=Release \
-DWEBVIEW_BUILD_DOCS=OFF \
-DWEBVIEW_BUILD_EXAMPLES=OFF \
-DWEBVIEW_INSTALL_TARGETS=OFF \
-S .. -B .
RUN cmake --build build --config Release
# Stage 2: Runtime image
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
libgtk-4-4 libwebkitgtk-6.0-4 ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Copy built artifacts and headers
COPY --from=builder /src/build /opt/webview/build
COPY --from=builder /src/core/include /usr/local/include
WORKDIR /opt/webview
# Provide an interactive shell by default
CMD ["/bin/bash"]
/.git /build **/build node_modules *.log .CMakeCache.txt CMakeFiles CMakeCache.txt */CMakeFiles */CMakeFiles
- Exact error message and exit code - ERROR: process "/bin/sh -c apt-get update && apt-get install -y --no-install-recommends libgtk-4-4 libwebkitgtk-6.0-4 ca-certificates && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100 - Failing command/step - [stage-1 2/5] RUN apt-get update && apt-get install -y --no-install-recommends libgtk-4-4 libwebkitgtk-6.0-4 ca-certificates && rm -rf /var/lib/apt/lists/* - Missing packages or files mentioned - E: Unable to locate package libgtk-4-4 - Version mismatch info - Base image is Ubuntu 22.04 (jammy) as seen in the logs; no explicit version mismatch is shown. The failure is due to libgtk-4-4 not being found in jammy's repositories.
# Stage 1: Build webview from source (Ubuntu 22.04)
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config \
libgtk-4-dev libwebkit2gtk-4.1-dev libwebkit2gtk-4.0-dev \
libglib2.0-dev ca-certificates curl python3
# Copy source
WORKDIR /src
COPY . .
# Build
RUN mkdir -p build && cd build && \
cmake -G Ninja \
-DWEBVIEW_BUILD=ON \
-DCMAKE_BUILD_TYPE=Release \
-DWEBVIEW_BUILD_DOCS=OFF \
-DWEBVIEW_BUILD_EXAMPLES=OFF \
-DWEBVIEW_INSTALL_TARGETS=OFF \
-S .. -B .
RUN cmake --build build --config Release
# Stage 2: Runtime image
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
libgtk-4-1 libwebkit2gtk-4.1-0 libwebkit2gtk-4.0-0 libglib2.0-0 ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Copy built artifacts and headers
COPY --from=builder /src/build /opt/webview/build
COPY --from=builder /src/core/include /usr/local/include
WORKDIR /opt/webview
# Ensure runtime can find libraries in the bundled build
ENV LD_LIBRARY_PATH=/opt/webview/build:${LD_LIBRARY_PATH}
# Provide an interactive shell by default
CMD ["/bin/bash"]
- Exact error message and exit code
- E: Unable to locate package libwebkit2gtk-4.0-0
- E: Couldn't find any package by glob 'libwebkit2gtk-4.0-0'
- E: Couldn't find any package by regex 'libwebkit2gtk-4.0-0'
- The step failed with exit code: 100
- Also: 1 warning found: UndefinedVar: Usage of undefined variable '$LD_LIBRARY_PATH' (line 40) Dockerfile:29
- Failing command/step
- Stage-1, step 2/5:
RUN apt-get update && apt-get install -y --no-install-recommends libgtk-4-1 libwebkit2gtk-4.1-0 libwebkit2gtk-4.0-0 libglib2.0-0 ca-certificates && rm -rf /var/lib/apt/lists/*
- Missing packages or files mentioned
- libwebkit2gtk-4.0-0 could not be located in the apt repositories
- Version mismatch info
- The image is Ubuntu 22.04 (jammy). libwebkit2gtk-4.0-0 is not available in the jammy repositories, causing a mismatch between the requested package and available packages.
- Additional context
- The failing command prevented the subsequent builder step from proceeding; the next step was canceled.# Stage 1: Build webview from source (Ubuntu 22.04)
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config \
libgtk-4-dev libwebkit2gtk-4.1-dev libglib2.0-dev ca-certificates \
curl python3
# Copy source
WORKDIR /src
COPY . .
# Build
RUN mkdir -p build && cd build && \
cmake -G Ninja \
-DWEBVIEW_BUILD=ON \
-DCMAKE_BUILD_TYPE=Release \
-DWEBVIEW_BUILD_DOCS=OFF \
-DWEBVIEW_BUILD_EXAMPLES=OFF \
-DWEBVIEW_INSTALL_TARGETS=OFF \
-S .. -B .
RUN cmake --build build --config Release
# Stage 2: Runtime image
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
libgtk-4-1 libwebkit2gtk-4.1-0 ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Copy built artifacts and headers
COPY --from=builder /src/build /opt/webview/build
COPY --from=builder /src/core/include /usr/local/include
WORKDIR /opt/webview
# Ensure runtime can find libraries in the bundled build
ENV LD_LIBRARY_PATH=/opt/webview/build:/opt/webview/build/lib
# Provide an interactive shell by default
CMD ["/bin/bash"]
Concerns: COPY of /src/core/include assumes the source layout includes core/include; if not present the build will fail at docker build time., The runtime smoke tests only verify presence of build artifacts and headers and do not execute or validate an actual binary; consider adding a lightweight runtime check that exercises a small sample or verifies dynamic linking. Smoke [FAIL]: test -d /opt/webview/build && echo 'build dir ok Output: sh: 1: Syntax error: Unterminated quoted string Smoke [FAIL]: test -d /usr/local/include && echo 'include dir ok Output: sh: 1: Syntax error: Unterminated quoted string Smoke [PASS]: ls -1 /opt/webview/build | head -n 5
# Stage 1: Build webview from source (Ubuntu 22.04)
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config \
libgtk-4-dev libwebkitgtk-6.0-dev ca-certificates \
curl python3
# Copy source
WORKDIR /src
COPY . .
# Build
RUN mkdir -p build && cd build && \
cmake -G Ninja \
-DWEBVIEW_BUILD=ON \
-DCMAKE_BUILD_TYPE=Release \
-DWEBVIEW_BUILD_DOCS=OFF \
-DWEBVIEW_BUILD_EXAMPLES=OFF \
-DWEBVIEW_INSTALL_TARGETS=OFF \
-S .. -B .
RUN cmake --build build --config Release
# Stage 2: Runtime image
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
libgtk-4-4 libwebkitgtk-6.0-4 ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Copy built artifacts and headers
COPY --from=builder /src/build /opt/webview/build
COPY --from=builder /src/core/include /usr/local/include
WORKDIR /opt/webview
# Ensure runtime can find libraries in the bundled build
ENV LD_LIBRARY_PATH=/opt/webview/build:/opt/webview/build/lib
# Provide an interactive shell by default
CMD ["/bin/bash"]
Concerns: The apt package names libwebkitgtk-6.0-dev and libwebkitgtk-6.0-4 do not exist on Ubuntu 22.04; WebKit GTK development/runtime typically uses libwebkit2gtk-4.0-dev and libwebkit2gtk-4.0-4 (package names vary by distro). This will fail during build/runtime., COPY --from=builder /src/core/include /usr/local/include assumes a path that may not exist in the source tree; if /src/core/include is missing, the build will fail., Runtime image installs GTK4/WebKit packages with names that may not exist or may be incomplete for the built library; missing runtime dependencies could cause the built library to fail to load., The build stage uses -DWEBVIEW_INSTALL_TARGETS=OFF; depending on the project, artifacts may not be placed where the runtime expects (the COPY from builder relies on /src/build). Ensure the built artifacts exist at /src/build before copying., CMD ["/bin/bash"] is fine for an interactive image, but for a library image intended for consumption, this may be suboptimal; consider an explicit entrypoint or a minimal executable for smoke tests.
# Stage 1: Build webview from source (Ubuntu 22.04)
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config \
libgtk-4-dev libwebkit2gtk-4.1-dev libwebkit2gtk-4.0-dev \
libglib2.0-dev ca-certificates curl python3
# Copy source
WORKDIR /src
COPY . .
# Build
RUN mkdir -p build && cd build && \
cmake -G Ninja \
-DWEBVIEW_BUILD=ON \
-DCMAKE_BUILD_TYPE=Release \
-DWEBVIEW_BUILD_DOCS=OFF \
-DWEBVIEW_BUILD_EXAMPLES=OFF \
-DWEBVIEW_INSTALL_TARGETS=OFF \
-S .. -B .
RUN cmake --build build --config Release
# Stage 2: Runtime image
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
libgtk-4-1 libwebkit2gtk-4.1-0 libwebkit2gtk-4.0-0 libglib2.0-0 ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Copy built artifacts and headers
COPY --from=builder /src/build /opt/webview/build
COPY --from=builder /src/core/include /usr/local/include
WORKDIR /opt/webview
# Ensure runtime can find libraries in the bundled build
ENV LD_LIBRARY_PATH=/opt/webview/build:/opt/webview/build/lib
# Provide an interactive shell by default
CMD ["/bin/bash"]
- Exact error messages and exit code - E: Unable to locate package libwebkit2gtk-4.0-0 - E: Couldn't find any package by glob 'libwebkit2gtk-4.0-0' - E: Couldn't find any package by regex 'libwebkit2gtk-4.0-0' - ERROR: failed to build: failed to solve: process "/bin/sh -c apt-get update && apt-get install -y --no-install-recommends libgtk-4-1 libwebkit2gtk-4.1-0 libwebkit2gtk-4.0-0 libglib2.0-0 ca-certificates && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100 - Failing command/step - [stage-1 2/5] RUN apt-get update && apt-get install -y --no-install-recommends libgtk-4-1 libwebkit2gtk-4.1-0 libwebkit2gtk-4.0-0 libglib2.0-0 ca-certificates && rm -rf /var/lib/apt/lists/* - Missing packages or files mentioned - libwebkit2gtk-4.0-0 (not found) - Version mismatch info - Base image uses Ubuntu 22.04 (jammy); libwebkit2gtk-4.0-0 is not available in jammy, while libwebkit2gtk-4.1-0 is available (the command also requests libwebkit2gtk-4.1-0). This indicates a mismatch or outdated package reference for the jammy repositories.
# Stage 1: Build webview from source (Ubuntu 22.04)
FROM ubuntu:22.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential cmake ninja-build pkg-config \
libgtk-4-dev libwebkit2gtk-4.1-dev libglib2.0-dev \
ca-certificates curl python3
# Copy source
WORKDIR /src
COPY . .
# Build
RUN mkdir -p build && cd build && \
cmake -G Ninja \
-DWEBVIEW_BUILD=ON \
-DCMAKE_BUILD_TYPE=Release \
-DWEBVIEW_BUILD_DOCS=OFF \
-DWEBVIEW_BUILD_EXAMPLES=OFF \
-DWEBVIEW_INSTALL_TARGETS=OFF \
-S .. -B .
RUN cmake --build build --config Release
# Stage 2: Runtime image
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
libgtk-4-1 libwebkit2gtk-4.1-0 libglib2.0-0 ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Copy built artifacts and headers
COPY --from=builder /src/build /opt/webview/build
COPY --from=builder /src/core/include /usr/local/include
WORKDIR /opt/webview
# Ensure runtime can find libraries in the bundled build
ENV LD_LIBRARY_PATH=/opt/webview/build:/opt/webview/build/lib
# Provide an interactive shell by default
CMD ["/bin/bash"]
Concerns: Final image only contains libraries and headers; no executable to run for runtime smoke test. Build artifacts are copied; ensure build outputs present in /opt/webview/build. Smoke [PASS]: test -d /opt/webview/build && echo OK || echo BUILD_DIR_MISSING Smoke [PASS]: test -d /opt/webview/build && ls -1 /opt/webview/build | head -n 1 >/dev/null 2>&1 && echo OK || echo NO_FILES Smoke [PASS]: test -d /usr/local/include && echo INCLUDE_PRESENT || echo INCLUDE_MISSING