/ opencodehub / Dockerfile.runner
swadhinbiswas feat: optimize Docker CI/CD builds, refine site-wide UI aesthetic, and remediate secrets · 8/19/2026
c3e5c18
45 lines · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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"]