json-c-json-c
SUCCESS
2m 36s
History Source
SummaryIterations1Transcript3Dockerfile
Dockerfile29 lines · 694 chars
# Dockerfile for building json-c from source using Meson on Ubuntu 22.04
FROM ubuntu:22.04

# Non-interactive installation
ENV DEBIAN_FRONTEND=noninteractive

# Install build dependencies
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        build-essential \
        meson \
        ninja-build \
        pkgconf \
    && rm -rf /var/lib/apt/lists/*

# Working directory for the build
WORKDIR /workspace

# Copy the repository contents
COPY . .

# Build from source using Meson, then run tests
RUN meson setup build -Dwarning_level=3 -Dbuildtype=debug \
    && meson compile -C build \
    && meson test -C build

# Default to an interactive shell
CMD ["/bin/bash"]