# Base image per repository blueprint
FROM ubuntu:jammy-20260217
LABEL maintainer="BuildAgent"
# Non-interactive to keep image deterministic
ENV DEBIAN_FRONTEND=noninteractive
# Install essential build and system utilities
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
build-essential \
xz-utils \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Working directory for the build source
WORKDIR /src
# Copy repository contents into the image
COPY . /src
# macOS-specific note: Linux builds are not defined for this repo.
# Provide a tiny placeholder build step that logs the macOS requirement during image creation
RUN mkdir -p /build && \
printf '#!/bin/sh\nset -e\ncat <<EOF\nBuild is intended for macOS with Xcode; no Linux-based build steps are defined in this repository.\nEOF\n' > /build/mac_build.sh && \
chmod +x /build/mac_build.sh
# Execute the placeholder build step so logs reflect the limitation
RUN /build/mac_build.sh
# Startup helper to inform users at container runtime about the macOS requirement,
# then drop into a shell for inspection or manual steps (if any).
RUN echo '#!/bin/sh' > /usr/local/bin/nnw_start && \
echo 'echo "NetNewsWire Linux container: This environment does not contain a macOS/Xcode build. Build is intended for macOS with Xcode; no Linux-based build steps are defined in this repository."' >> /usr/local/bin/nnw_start && \
echo 'exec "$@"' >> /usr/local/bin/nnw_start && \
chmod +x /usr/local/bin/nnw_start
CMD ["/usr/local/bin/nnw_start", "bash"]
# Ignore VCS and common local artefacts .git .gitignore .DS_Store .AppleDouble .LSOverride **/*.pyc **/__pycache__/ node_modules/ build/ dist/ *.xcworkspace DerivedData/ *.log *.gz *.zip *.tar.gz .idea/ .vscode/
Concerns: No Swift toolchain or actual build steps are present; the Dockerfile only runs a placeholder script and logs a macOS/Xcode note, not building the Swift desktop app., There are no Linux-based build steps for a macOS-targeted project; it does not install Swift or provide a Linux build path, making the container effectively unusable for building/running the app in Linux., The CMD/ startup logic drops into a shell after printing a macOS requirement, which is not a usable app runtime and may be confusing for users expecting a runnable desktop application.
# Base image per repository blueprint
FROM ubuntu:jammy-20260217
LABEL maintainer="BuildAgent"
# Non-interactive to keep image deterministic
ENV DEBIAN_FRONTEND=noninteractive
# Install essential build and system utilities
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
build-essential \
xz-utils \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Working directory for the build source
WORKDIR /src
# Copy repository contents into the image
COPY . /src
# macOS-specific note: Linux builds are not defined for this repo.
# Provide a clear runtime message explaining the macOS/Xcode requirement.
RUN mkdir -p /src/scripts
RUN bash -lc 'cat > /src/scripts/BUILD_INFO.sh << "EOS"
#!/bin/sh
set -e
echo "NetNewsWire: Linux-based builds are not supported for this repository."
echo "This project targets macOS with Xcode. A remote Mac or macOS host is required to build."
echo "No Linux-based build steps are defined in this repository."
EOS
chmod +x /src/scripts/BUILD_INFO.sh'
# Ensure the script is executable
RUN chmod +x /src/scripts/BUILD_INFO.sh
# Start-up: print build limitation information and drop to a shell for inspection
CMD ["bash", "-lc", "/src/scripts/BUILD_INFO.sh && exec bash"]
Concerns: No actual build steps to compile or build the Swift/desktop app; container only prints macOS build limitation., The image is effectively a placeholder for macOS/Xcode targets and cannot build Linux/Swift apps as described., COPY . /src may copy large or sensitive files; recommend adding a .dockerignore to avoid shipping unnecessary content.
# Base image per repository blueprint
FROM ubuntu:jammy-20260217
LABEL maintainer="BuildAgent"
# Non-interactive to keep image deterministic
ENV DEBIAN_FRONTEND=noninteractive
# Install essential build and system utilities
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
build-essential \
xz-utils \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Working directory for the build source
WORKDIR /src
# Copy repository contents into the image
COPY . /src
# macOS-specific note: Linux builds are not defined for this repo.
# Provide a clear runtime message explaining the macOS/Xcode requirement.
RUN mkdir -p /src/scripts
RUN bash -lc 'cat > /src/scripts/BUILD_INFO.sh << "EOS"\
#!/bin/sh\nset -e\necho "Build is intended for macOS with Xcode; no Linux-based build steps are defined in this repository."\necho "This blueprint cannot implement a valid macOS build process; a macOS CI or remote Mac environment is required."\nEOS\nchmod +x /src/scripts/BUILD_INFO.sh'
# Ensure the script is executable
RUN chmod +x /src/scripts/BUILD_INFO.sh
# Start-up: print build limitation information and drop to a shell for inspection
RUN /src/scripts/BUILD_INFO.sh
# Create entrypoint wrapper that informs about macOS requirement and then executes requested command
RUN bash -lc 'mkdir -p /usr/local/bin; cat > /usr/local/bin/nnw_entry << "EOS2"\
#!/bin/sh\nset -e\necho "NetNewsWire Linux container: This environment cannot build macOS AppKit. A macOS host with Xcode is required to build NetNewsWire."\nexec "$@"\nEOS2\nchmod +x /usr/local/bin/nnw_entry'
# Set the entrypoint so that starting the container prints the limitation and then launches the requested command
ENTRYPOINT ["/usr/local/bin/nnw_entry"]
CMD ["bash"]
Concerns: Does not build the application from source; only prints a macOS/Xcode limitation message and provides a placeholder runtime, failing the 'build from source' criterion., The RUN steps that generate BUILD_INFO.sh and nnw_entry embed newlines via \n inside here-docs, which creates invalid shell scripts and will likely cause docker build to fail., Potentially fragile due to the base image tag ubuntu:jammy-20260217 (may not exist in all registries) and the overall placeholder nature of the container for a Swift desktop app.
# Base image per repository blueprint
FROM ubuntu:jammy-20260217
LABEL maintainer="BuildAgent"
# Non-interactive to keep image deterministic
ENV DEBIAN_FRONTEND=noninteractive
# Install essential build and system utilities
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
build-essential \
xz-utils \
unzip \
&& rm -rf /var/lib/apt/lists/*
# Working directory for the build source
WORKDIR /src
# Copy repository contents into the image
COPY . /src
# Build placeholder: macOS/Xcode is required to build this project.
# Create a small script that outputs the macOS requirement and exits successfully.
RUN bash -lc 'cat > /build_info.sh << "SH"\n#!/bin/sh\nset -e\necho "Build is intended for macOS with Xcode; no Linux-based build steps are defined in this repository."\necho "This container cannot build NetNewsWire on Linux. Use a macOS CI or remote Mac environment."\nSH\nchmod +x /build_info.sh'
# Run the placeholder build script to document the limitation during image build
RUN /build_info.sh
# Create a simple entrypoint that informs users about the macOS requirement
RUN bash -lc 'cat > /usr/local/bin/nnw_entry << "EE"\n#!/bin/sh\nset -e\necho "NetNewsWire Linux container: macOS/Xcode build required. If you want a shell, run bash directly."\nexec "$@"\nEE\nchmod +x /usr/local/bin/nnw_entry'
# Set the entrypoint so that starting the container prints the limitation and then launches the requested command
ENTRYPOINT ["/usr/local/bin/nnw_entry"]
CMD ["bash"]
Concerns: The Dockerfile does not build the application from source; it only prints a macOS/Xcode build limitation during image build, so it fails the criterion of building the app from source., The ENTRYPOINT/CMD are placeholders that merely inform the user of the macOS requirement and do not produce a usable Linux/Linux build of the desktop app., COPY . /src may bring in the entire repository context without guaranteeing a Linux-build path; without actual Linux build steps, this is effectively a placeholder image.
FROM swift:5.9-jammy AS builder
LABEL maintainer="BuildAgent"
# Build stage: attempt to compile any Swift Package if present
WORKDIR /app
COPY . /app
# Install lightweight build dependencies that Swift may require
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libsqlite3-dev libxml2-dev libcurl4-openssl-dev ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN swift --version
# If the repository contains a Swift Package Manifest, build it in release mode.
RUN if [ -f Package.swift ]; then swift build -c release; fi
# Show any produced release artifacts (best-effort)
RUN if [ -d ".build/release" ]; then ls -la .build/release; fi
FROM ubuntu:jammy-20260217 AS runtime
WORKDIR /app
COPY --from=builder /app /app
# Try to run a built binary if one exists; this container is Linux-based and may not be able to execute macOS apps.
CMD ["bash","-lc","for b in NetNewsWire NetNewsWire7 NNW; do if [ -x \".build/release/$b\" ]; then exec \".build/release/$b\"; fi; done; echo 'No suitable executable found in .build/release. This project targets macOS (AppKit/UIKit) and cannot be fully run in Linux containers.'"]
# Ignore version control and build artefacts .git/ .gitignore .DS_Store *.swp *.swo .DS_Store* DerivedData/ Build/ build/ .build/ .swiftpm/ Packages/ # macOS/iOS specific */Pods/ # IDEs *.xcodeproj/project.xcworkspace/ *.xcworkspace/ # Local developer settings *.xcconfig DeveloperSettings.xcconfig
Concerns: Building a macOS/AppKit/UIKit-targeted Swift project in a Linux-based container is unlikely to succeed; the build may fail due to macOS-only dependencies/frameworks., If a Package.swift exists, swift build -c release may fail on Linux targets, causing the image build to fail even though the runtime behavior is designed to report incompatibility., The runtime CMD only runs a built binary if a Linux-appropriate executable exists; otherwise it prints a macOS-targeted message, which is correct but indicates the container may not produce a runnable desktop app on Linux. Smoke [PASS]: if [ -d /app/.build/release ]; then ls -la /app/.build/release; else echo 'no release dir'; fi Smoke [PASS]: if [ -x /app/.build/release/NetNewsWire ]; then echo 'NetNewsWire binary is executable'; elif [ -x /app/.build/release/NNW ]; then echo 'NNW binary is executable'; else echo 'no Linux executable found'; fi