forgejo/docs
32
45
Fork
You've already forked docs
204

Installation of forgejo-runner via docker - which docs should one use? #1377

Open
opened 2025年08月11日 09:45:00 +02:00 by CSDUMMI · 8 comments

I think there is an inconsistency between the docs and the example docker-compose files linked by them.

The docs describe a process with:

  • data.forgejo.org/forgejo/runner:4.0.0 (current version is 9.0.3) as the runner image.
  • docker:dind as the dind image.
  • It advices to edit docker compose file after registering the runner.

The examples on the other hand use:

  • code.forgejo.org/forgejo/runner:9.0.3 for the runner.
  • code.forgejo.org/oci/docker:dind for the dind
  • Also run a forgejo instance on the same machine (something the docs warn against).
  • It has separate services runner-register and runner-daemon.

This is very confusing. Could the docs use an update?

I think there is an inconsistency between the docs and the example docker-compose files linked by them. The [docs](https://codeberg.org/forgejo/docs/src/branch/next/docs/admin/actions/runner-installation.md#oci-image-installation) describe a process with: - `data.forgejo.org/forgejo/runner:4.0.0` (current version is `9.0.3`) as the runner image. - `docker:dind` as the dind image. - It advices to edit docker compose file after registering the runner. The [examples](https://code.forgejo.org/forgejo/runner/src/branch/main/examples/docker-compose/compose-forgejo-and-runner.yml) on the other hand use: - `code.forgejo.org/forgejo/runner:9.0.3` for the runner. - `code.forgejo.org/oci/docker:dind` for the `dind` - Also run a forgejo instance on the same machine (something the docs warn against). - It has separate services `runner-register` and `runner-daemon`. This is very confusing. Could the docs use an update?
Contributor
Copy link

The examples receive automated updates and run in the CI, which explains why they are more up to date. The doc needs manual attention.

Could you please review #1378?

The examples receive automated updates and run in the CI, which explains why they are more up to date. The doc needs manual attention. Could you please review https://codeberg.org/forgejo/docs/pulls/1378?
Author
Copy link

Thanks for the quick PR.

Regarding the registration process, is editing the docker-compose file after registration really the best way to setup a docker-compose based runner?

Thanks for the quick PR. Regarding the registration process, is editing the docker-compose file after registration really the best way to setup a docker-compose based runner?
Author
Copy link

I think a simpler docker-compose.yml file to use in the docs would be:

services:docker-in-docker:image:code.forgejo.org/oci/docker:dindhostname:dockerprivileged:trueenvironment:DOCKER_TLS_CERTDIR:/certsDOCKER_HOST:docker-in-dockervolumes:- ./certs:/certsrunner:image:code.forgejo.org/forgejo/runner:9.0.3environment:DOCKER_HOST:tcp://docker:2376DOCKER_CERT_PATH:/certs/clientDOCKER_TLS_VERIFY:"1"depends_on:docker-in-docker:condition:service_startedvolumes:- ./data:/data- ./certs:/certsuser:1001:1001command:forgejo-runner daemon

And to then use docker compose run -u 1001 --rm -it runner forgejo-runner register or create-runner-file to register the runner manually and offline, respectively?

After that the admin can run docker compose up -d and no modification to the docker-compose.yml file will be necessary.

I think a simpler `docker-compose.yml` file to use in the docs would be: ```yml services: docker-in-docker: image: code.forgejo.org/oci/docker:dind hostname: docker privileged: true environment: DOCKER_TLS_CERTDIR: /certs DOCKER_HOST: docker-in-docker volumes: - ./certs:/certs runner: image: code.forgejo.org/forgejo/runner:9.0.3 environment: DOCKER_HOST: tcp://docker:2376 DOCKER_CERT_PATH: /certs/client DOCKER_TLS_VERIFY: "1" depends_on: docker-in-docker: condition: service_started volumes: - ./data:/data - ./certs:/certs user: 1001:1001 command: forgejo-runner daemon ``` And to then use `docker compose run -u 1001 --rm -it runner forgejo-runner register` or `create-runner-file` to register the runner manually and offline, respectively? After that the admin can run `docker compose up -d` and no modification to the `docker-compose.yml` file will be necessary.
Contributor
Copy link

The problem here is to go from something that works in theory (your docker compose seems fine) to something that is known to work. As a reviewer, how do you propose I verify what you propose actually works?

The problem here is to go from something that works in theory (your docker compose seems fine) to something that is known to work. As a reviewer, how do you propose I verify what you propose actually works?
Author
Copy link

I can write up my approach as a PR to the docs and you can verify that following them will setup a runner and register it?

I can write up my approach as a PR to the docs and you can verify that following them will setup a runner and register it?
Contributor
Copy link

@CSDUMMI wrote in #1377 (comment):

I can write up my approach as a PR to the docs and you can verify that following them will setup a runner and register it?

I can do that 👍

@CSDUMMI wrote in https://codeberg.org/forgejo/docs/issues/1377#issuecomment-6251590: > I can write up my approach as a PR to the docs and you can verify that following them will setup a runner and register it? I can do that 👍
Author
Copy link

I've created a PR with what I think is a simplified setup guide using docker-compose.

Your review would be very welcome: #1385

I've created a PR with what I think is a simplified setup guide using docker-compose. Your review would be very welcome: https://codeberg.org/forgejo/docs/pulls/1385

Sorry, I didn't see this issue before opening #1634 - but I think there are several issues going on:

  • Running forgejo-runner register from a Docker Compose service... it seems everyone agrees this needs to happen 😄.
  • Should the Docker Compose setup be elevated as the "default" setup? (I think so - it's the fastest and easiest instructions!). Open a new issue to discuss this? Yes/No?
  • Additional changes to the dind service, adding the certs/ folder (proposed in #1385) - I'm not sure if this is necessary anymore, I haven't encountered issues.
  • As offered, I can split out the firewall considerations from #1634 - but I think they're important.
Sorry, I didn't see this issue before opening https://codeberg.org/forgejo/docs/pulls/1634 - but I think there are several issues going on: * Running `forgejo-runner register` from a Docker Compose service... it seems everyone agrees this needs to happen 😄. * Should the Docker Compose setup be elevated as the "default" setup? (I think so - it's the fastest and easiest instructions!). **Open a new issue to discuss this? Yes/No?** * Additional changes to the dind service, adding the `certs/` folder (proposed in #1385) - I'm not sure if this is necessary anymore, I haven't encountered issues. * As offered, I can split out the firewall considerations from #1634 - but I think they're important.
Sign in to join this conversation.
No Branch/Tag specified
next
cli
v14.0
v13.0
v11.0
v12.0
bp-v12.0-a6c8557
v7.0
v10.0
v9.0
v8.0
v1.21
v1.20
v1.19
v13.0.0-dev
Labels
Clear labels
404

Broken links or missing content
backport/v1.19

Changes which should be backported to the v1.19 docs

Archived

backport/v1.20

Changes which should be backported to the v1.20 docs

Archived

backport/v1.21

Changes which should be backported to the v1.21 docs

Archived

backport/v10.0

Automated backport to v10.0

Archived

backport/v11.0

Automated backport to v11.0
backport/v12.0

Automated backport to v12.0

Archived

backport/v13.0

Automated backport to v13.0
backport/v14.0

Automated backport to v14.0
backport/v7.0

Automated backport to the v7.0 docs

Archived

backport/v8.0

Automated backport to the v8.0 docs

Archived

backport/v9.0

Automated backport to the v9.0 docs

Archived

good first issue

This issue is suitable for "drive-by contributors" wanting to contribute for the first time, and fixing it should be straightforward.
meta

Tooling and processes for maintaining the docs
new docs

Content to be added to the documentation

Archived

User research - Accessibility

Requires input about accessibility features, likely involves user testing.
User research - Blocked

Do not pick as-is! We are happy if you can help, but please coordinate with ongoing redesign in this area.
User research - Community

Community features, such as discovering other people's work or otherwise feeling welcome on a Forgejo instance.
User research - Config (instance)

Instance-wide configuration, authentication and other admin-only needs.
User research - Errors

How to deal with errors in the application and write helpful error messages.
User research - Filters

How filter and search is being worked with.
User research - Future backlog

The issue might be inspiring for future design work.
User research - Git workflow

AGit, fork-based and new Git workflow, PR creation etc
User research - Labels

Active research about Labels
User research - Moderation

Moderation Featuers for Admins are undergoing active User Research
User research - Needs input

Use this label to let the User Research team know their input is requested.
User research - Notifications/Dashboard

Research on how users should know what to do next.
User research - Rendering

Text rendering, markup languages etc
User research - Repo creation

Active research about the New Repo dialog.
User research - Repo units

The repo sections, disabling them and the "Add more" button.
User research - Security
User research - Settings (in-app)

How to structure in-app settings in the future?
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo/docs#1377
Reference in a new issue
forgejo/docs
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?