2026-01-12 17:39:34 +01:00
|
|
|
services:
|
|
|
|
|
dev:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Containerfile.debian
|
2026-01-31 08:13:53 +01:00
|
|
|
target: develop
|
2026-01-12 17:39:34 +01:00
|
|
|
working_dir: /smal
|
|
|
|
|
volumes:
|
|
|
|
|
- ./smal:/smal:ro
|
2026-01-31 08:13:53 +01:00
|
|
|
- ./work:/work
|
|
|
|
|
|
|
|
|
|
demobot:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Containerfile.debian
|
|
|
|
|
target: demobot
|
|
|
|
|
command: demobot
|
|
|
|
|
volumes:
|
|
|
|
|
- demobot_data:/demobot
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
2026-02-13 23:58:58 +01:00
|
|
|
dind:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
pull: true
|
|
|
|
|
dockerfile_inline: |
|
|
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
FROM docker.io/library/docker:dind-rootless
|
|
|
|
|
USER root
|
|
|
|
|
RUN mkdir /woodpecker && chmod 0777 /woodpecker
|
|
|
|
|
USER rootless
|
|
|
|
|
RUN mkdir -p /home/rootless/dockersock
|
|
|
|
|
|
|
|
|
|
command: ['dockerd', '-H', 'unix:///home/rootless/dockersock/docker.sock', '--tls=false']
|
|
|
|
|
privileged: true
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
volumes:
|
|
|
|
|
- dind-run:/home/rootless/dockersock
|
|
|
|
|
- dind-data:/home/rootless/.local/share/docker
|
|
|
|
|
- .:/woodpecker
|
|
|
|
|
environment:
|
|
|
|
|
DOCKER_HOST: 'unix:///home/rootless/dockersock/docker.sock'
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "docker", "info"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
start_period: 10s
|
|
|
|
|
|
|
|
|
|
go-build-test:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
pull: true
|
|
|
|
|
dockerfile_inline: |
|
|
|
|
|
# syntax=docker/dockerfile:1
|
2026-02-20 19:24:15 +01:00
|
|
|
FROM docker.io/golang:1.26 AS gobuild
|
|
|
|
|
|
|
|
|
|
WORKDIR /woodpeckerhack
|
|
|
|
|
|
2026-02-22 11:20:22 +01:00
|
|
|
RUN git clone -b cli-exec-matrix-fix https://codeberg.org/saces/woodpecker.git .
|
2026-02-20 19:24:15 +01:00
|
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
|
|
|
|
--mount=type=cache,target=/go/pkg \
|
|
|
|
|
make build-cli
|
|
|
|
|
|
2026-02-13 23:58:58 +01:00
|
|
|
FROM docker.io/woodpeckerci/woodpecker-cli:next-alpine
|
2026-02-20 19:24:15 +01:00
|
|
|
COPY --from=gobuild /woodpeckerhack/dist/woodpecker-cli /bin/
|
|
|
|
|
|
2026-02-13 23:58:58 +01:00
|
|
|
USER root
|
|
|
|
|
RUN <<EOF
|
|
|
|
|
set -e
|
|
|
|
|
addgroup -g 2375 -S docker
|
|
|
|
|
addgroup -g 102374 -S dind
|
|
|
|
|
addgroup woodpecker docker
|
|
|
|
|
addgroup woodpecker dind
|
|
|
|
|
EOF
|
|
|
|
|
USER woodpecker
|
|
|
|
|
command: exec .woodpecker/go-buildtest.yaml
|
|
|
|
|
restart: no
|
|
|
|
|
environment:
|
|
|
|
|
DOCKER_HOST: 'unix:///var/run/dind/docker.sock'
|
|
|
|
|
volumes:
|
|
|
|
|
- /etc/timezone:/etc/timezone:ro
|
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
|
- dind-run:/var/run/dind
|
|
|
|
|
- .:/woodpecker:ro
|
|
|
|
|
depends_on:
|
|
|
|
|
dind:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
2026-01-31 08:13:53 +01:00
|
|
|
volumes:
|
|
|
|
|
demobot_data:
|
2026-02-13 23:58:58 +01:00
|
|
|
dind-run:
|
|
|
|
|
dind-data:
|