|
| 1 | +ARG DEBIAN_FRONTEND=noninteractive |
| 2 | +ARG RUNNER_VERSION=2.331.0 |
| 3 | + |
| 4 | +FROM debian:latest AS git-builder |
| 5 | +RUN apt-get update -y && apt-get install -y --no-install-recommends \ |
| 6 | + ca-certificates curl sudo |
| 7 | +COPY build-git.sh /tmp/build-git.sh |
| 8 | +RUN bash /tmp/build-git.sh |
| 9 | + |
| 10 | +FROM debian:latest AS semcode-builder |
| 11 | +RUN apt-get update -y && apt-get install -y --no-install-recommends \ |
| 12 | + ca-certificates curl git sudo wget |
| 13 | +COPY build-semcode.sh /tmp/build-semcode.sh |
| 14 | +RUN bash /tmp/build-semcode.sh |
| 15 | + |
| 16 | +FROM debian:latest as runtime |
| 17 | + |
| 18 | +# Install pre-requisites for GitHub Actions Runner client app |
| 19 | +# https://github.com/actions/runner/blob/main/docs/start/envlinux.md |
| 20 | +RUN curl -Lf https://raw.githubusercontent.com/actions/runner/v${RUNNER_VERSION}/src/Misc/layoutbin/installdependencies.sh \ |
| 21 | + -o /tmp/install-gha-runner-deps.sh |
| 22 | +RUN bash /tmp/install-gha-runner-deps.sh |
| 23 | + |
| 24 | +RUN apt-get update -y && apt-get install -y --no-install-recommends \ |
| 25 | + ca-certificates libcurl3-gnutls |
| 26 | +COPY --from=git-builder /opt/git-staging/usr/local /usr/local |
| 27 | + |
| 28 | +ENV MIRRORS_PATH=/ci/mirrors |
| 29 | +COPY setup-mirror-repos.sh /tmp/setup-mirror-repos.sh |
| 30 | +RUN bash /tmp/setup-mirror-repos.sh |
| 31 | +RUN mkdir -p /libbpfci/mirrors && ln -s ${MIRRORS_PATH}/linux /libbpfci/mirrors/linux |
| 32 | + |
| 33 | +COPY --from=semcode-builder /opt/semcode /usr/local/bin/semcode |
| 34 | +COPY --from=semcode-builder /opt/semcode-index /usr/local/bin/semcode-index |
| 35 | +COPY --from=semcode-builder /opt/semcode-mcp /usr/local/bin/semcode-mcp |
| 36 | +COPY --from=semcode-builder /opt/semcode-lsp /usr/local/bin/semcode-lsp |
| 37 | + |
| 38 | +RUN cd ${MIRRORS_PATH}/linux && \ |
| 39 | + git remote add torvalds https://github.com/torvalds/linux.git && \ |
| 40 | + git fetch torvalds && \ |
| 41 | + git checkout origin/bpf-next |
| 42 | +RUN cd ${MIRRORS_PATH}/linux && \ |
| 43 | + semcode-index -d /ci/.semcode.db --git $(git describe --tags --abbrev=0)..HEAD |
| 44 | +RUN semcode-index -d /ci/.semcode.db --lore bpf |
0 commit comments