mirror of
https://gitea.com/gitea/act_runner.git
synced 2025-06-12 09:37:14 +02:00
feat: improve Docker configuration and detection handling (#242)
- Pass `cfg` to `envcheck.CheckIfDockerRunning` function - Add `Docker` struct to `config.go` for Docker configuration - Update `config.example.yaml` with `docker` configuration options - Modify `CheckIfDockerRunning` in `docker.go` to use Docker host from config if provided Signed-off-by: appleboy <appleboy.tw@gmail.com> Reviewed-on: https://gitea.com/gitea/act_runner/pulls/242 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: wxiaoguang <wxiaoguang@noreply.gitea.com> Co-authored-by: appleboy <appleboy.tw@gmail.com> Co-committed-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
@ -63,7 +63,7 @@ func runDaemon(ctx context.Context, configFile *string) func(cmd *cobra.Command,
|
||||
}
|
||||
|
||||
if ls.RequireDocker() {
|
||||
if err := envcheck.CheckIfDockerRunning(ctx); err != nil {
|
||||
if err := envcheck.CheckIfDockerRunning(ctx, cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user