-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs about how to generate config for act runner with docker and setup it with docker-compose #25256
Conversation
The motivation of this PR is that I have wasted half an hour debugging my network after seen the |
@@ -82,6 +82,12 @@ When you are using the docker image, you can specify the configuration file by u | |||
docker run -v $(pwd)/config.yaml:/config.yaml -e CONFIG_FILE=/config.yaml ... | |||
``` | |||
|
|||
You need to create config.yaml before running the container, to avoid `Error: EOF` errors. Neither use the method mentioned above, or just run the following command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config.yaml is not a necessary if you are using a default setting. But if you put an empty file, then what should happen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meanwhile, docker mount/volume will create a directory when the mount source is not existing. So maybe creating a config.yaml
in advance is the best practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, maybe you should create an empty config file but not a folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but as the screenshot above create a empty config file will cause the program to crash with a confusing error message. After roughly viewed the source code, I think the runner requires a well formated yaml config to work, but a empty yaml file just cannot make the parser happy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thus, it's neede to using generate-config to generate a working config first.
EDT: In the screenshot above, $(pwd)/config.yaml
is an already created empty file.
My opinions:
So my suggestions are:
|
@wolfogre thanks for the suggestion. Also, I've opened a related issue on act_runner at https://gitea.com/gitea/act_runner/issues/240. |
…p it with docker-compose (go-gitea#25256) In this pull request, the following changes are addressed: - State user should create `config.yaml` before start container to avoid errors. - Provided instructions to deploy runners using docker compose.
…p it with docker-compose (#25256) (#25296) Backport #25256 by @thezzisu In this pull request, the following changes are addressed: - State user should create `config.yaml` before start container to avoid errors. - Provided instructions to deploy runners using docker compose. Co-authored-by: Zisu Zhang <thezzisu@gmail.com>
* giteaofficial/main: Show if File is Executable (go-gitea#25287) Add devcontainer config for developing Gitea (go-gitea#24781) Add link to support page for commercial support (go-gitea#25293) Docs about how to generate config for act runner with docker and setup it with docker-compose (go-gitea#25256) Fix some UI alignments (go-gitea#25277) Remove fomantic inverted variations (go-gitea#25286) Fix issue and commit status popup padding (go-gitea#25254)
In this pull request, the following changes are addressed:
config.yaml
before start container to avoid errors.