mirror of
https://gitea.com/gitea/act_runner.git
synced 2025-06-13 01:57:13 +02:00
Move docker.host
to container.docker_host
(#244)
Follow #242. Move `docker.host` to `container.docker_host`. There are already some options for docker/container in `container`, so developers could get confused about where to add options. It's breaking, but I think it's OK since `docker.host` was added just two days ago. Reviewed-on: https://gitea.com/gitea/act_runner/pulls/244 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
@ -7,9 +7,9 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"gitea.com/gitea/act_runner/internal/pkg/config"
|
||||
|
||||
"github.com/docker/docker/client"
|
||||
|
||||
"gitea.com/gitea/act_runner/internal/pkg/config"
|
||||
)
|
||||
|
||||
func CheckIfDockerRunning(ctx context.Context, cfg *config.Config) error {
|
||||
@ -17,8 +17,8 @@ func CheckIfDockerRunning(ctx context.Context, cfg *config.Config) error {
|
||||
client.FromEnv,
|
||||
}
|
||||
|
||||
if cfg.Docker.Host != "" {
|
||||
opts = append(opts, client.WithHost(cfg.Docker.Host))
|
||||
if cfg.Container.DockerHost != "" {
|
||||
opts = append(opts, client.WithHost(cfg.Container.DockerHost))
|
||||
}
|
||||
|
||||
cli, err := client.NewClientWithOpts(opts...)
|
||||
|
Reference in New Issue
Block a user