File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM ubuntu:24.04
2+ ARG TARGETARCH
3+
4+ # 1. Install EVERYTHING (Build tools + Runtime tools)
5+ RUN apt-get update && apt-get install -y --no-install-recommends \
6+ build-essential \
7+ cmake \
8+ ninja-build \
9+ wget \
10+ ca-certificates \
11+ python3 \
12+ nano \
13+ less \
14+ git \
15+ libxml2 \
16+ libxml2-dev \
17+ && apt-get clean \
18+ && rm -rf /var/lib/apt/lists/*
19+
20+ # 2. Install srcML (Runtime and Dev headers together)
21+ RUN if [ "$TARGETARCH" = "amd64" ]; then \
22+ wget https://github.com/srcML/srcML/releases/download/v1.1.0/srcml_1.1.0-1_ubuntu24.04_amd64.deb \
23+ && wget https://github.com/srcML/srcML/releases/download/v1.1.0/srcml-dev_1.1.0-1_ubuntu24.04_amd64.deb; \
24+ elif [ "$TARGETARCH" = "arm64" ]; then \
25+ wget https://github.com/srcML/srcML/releases/download/v1.1.0/srcml_1.1.0-1_ubuntu24.04_arm64.deb \
26+ && wget https://github.com/srcML/srcML/releases/download/v1.1.0/srcml-dev_1.1.0-1_ubuntu22.04_arm64.deb; \
27+ else \
28+ echo "Unsupported arch: $TARGETARCH" && exit 1; \
29+ fi && \
30+ apt-get update && apt-get install -y ./*.deb && rm -f ./*.deb
31+
32+ # 3. Build and install srcSAX (Force standard paths so nameCollector finds it)
33+ COPY srcSAX /srcSAX
34+ WORKDIR /srcSAX
35+ RUN cmake -B build -G Ninja \
36+ -DCMAKE_INSTALL_PREFIX=/usr/local \
37+ -DCMAKE_INSTALL_LIBDIR=lib \
38+ -DCMAKE_INSTALL_INCLUDEDIR=include \
39+ && cd build \
40+ && ninja install
41+
42+ # 4. Build nameCollector
43+ COPY nameCollector /nameCollector
44+ WORKDIR /nameCollector
45+ RUN cmake -B build -G Ninja && cd build && ninja
46+
47+ # 5. Set default directory straight to the compiled binary
48+ WORKDIR /nameCollector/build/bin
You can’t perform that action at this time.
0 commit comments