# syntax=docker/dockerfile:1.4 # OpenCodeHub CI/CD Runner (Docker-in-Docker) FROM docker:24-dind LABEL org.opencontainers.image.title="OpenCodeHub Runner" \ org.opencontainers.image.description="Docker-in-Docker CI/CD runner for OpenCodeHub pipelines." \ org.opencontainers.image.url="https://github.com/swadhinbiswas/OpencodeHub" \ org.opencontainers.image.source="https://github.com/swadhinbiswas/OpencodeHub" \ org.opencontainers.image.licenses="MIT" # Install essential build tools & runtimes in a single layer with clean cache RUN apk add --no-cache \ nodejs \ npm \ git \ openssh-client \ curl \ bash \ jq \ python3 \ py3-pip \ make \ gcc \ g++ \ libc-dev \ tar \ gzip \ xz # Install global package managers and clean npm cache RUN npm install -g pnpm yarn @types/node \ && npm cache clean --force \ && rm -rf /root/.npm /tmp/* /var/cache/apk/* WORKDIR /runner COPY scripts/runner.sh /runner/runner.sh RUN chmod +x /runner/runner.sh && mkdir -p /work /cache ENV RUNNER_WORK_DIR=/work ENV RUNNER_CACHE_DIR=/cache ENV DOCKER_HOST=unix:///var/run/docker.sock ENTRYPOINT ["/runner/runner.sh"]