Compare commits

...

3 commits
v1.1.0 ... main

Author SHA1 Message Date
a9e044d2da
Add example docker compose + README File
All checks were successful
docker
2023-03-24 14:38:13 +01:00
325cf611de
Fix missing app folder
All checks were successful
docker
2023-03-24 14:26:00 +01:00
f59798df65
Move runner into folder and fix CMD
Some checks failed
docker
2023-03-24 14:23:08 +01:00
3 changed files with 23 additions and 7 deletions

View file

@ -3,22 +3,19 @@ ARG CHECKOUT=main
# Go container # Go container
FROM golang:1.20.2-alpine3.17 AS GO_BUILD FROM golang:1.20.2-alpine3.17 AS GO_BUILD
ARG CHECKOUT ARG CHECKOUT
RUN apk fix && \ RUN apk fix && \
apk --no-cache --update add git make apk --no-cache --update add git make
RUN mkdir /build RUN mkdir /build
RUN git clone https://code.forgejo.org/forgejo/runner.git /build/runner \ RUN git clone https://code.forgejo.org/forgejo/runner.git /build/runner \
&& cd /build/runner \ && cd /build/runner \
&& git checkout $CHECKOUT && git checkout $CHECKOUT
WORKDIR /build/runner WORKDIR /build/runner
RUN make build RUN make build
# -- # --
# Final Container # Final Container
FROM alpine:3.17 FROM alpine:3.17
COPY --from=GO_BUILD /build/runner/forgejo-runner ./ RUN mkdir /app
COPY --from=GO_BUILD /build/runner/forgejo-runner /app/forgejo-runner
CMD ["./forgejo-runner"] WORKDIR /app
CMD ["./forgejo-runner", "daemon"]

View file

@ -1,2 +1,13 @@
# runner-docker # runner-docker
Use this to register the runner
```bash
docker run -it -v $(pwd)/runner.conf:/app/.runner git.itzyanick.de/itzyanick/runner-docker:v1.1.0-2 ./forgejo-runner register
```
Then run the runner
```bash
docker compose up -d
```

8
docker-compose.yml Normal file
View file

@ -0,0 +1,8 @@
version: "3.7"
services:
runner:
image: git.itzyanick.de/itzyanick/runner-docker:v1.1.0-2
restart: unless-stopped
volumes:
- "./runner.conf:/app/.runner"
- "/var/run/docker.sock:/var/run/docker.sock"