FROM swift:6.2
# Install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
git ca-certificates build-essential cmake pkg-config \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace
# Copy the repository
COPY . .
# Build the project from source
RUN swift build -c release
# Default command for a quick sanity check
CMD ["bash", "-lc", "echo SwiftProtobuf container ready; swift --version"]