Improve the usage of docker_host configuration #260

Merged
wolfogre merged 4 commits from Zettat123/act_runner:improve-docker-host into main 2023-06-30 04:00:07 +00:00
Member

Follow #242, #244
Fixes #258

Users could use docker_host configuration to specify which docker daemon will be used by act_runner.

  • If docker_host is empty, act_runner will find an available docker host automatically.
  • If docker_host is "-", act_runner will find an available docker host automatically, but the docker host won't be mounted to the job containers and service containers.
  • If docker_host is not empty or "-", the specified docker host will be used. An error will be returned if it doesn't work.
Follow #242, #244 Fixes #258 Users could use `docker_host` configuration to specify which docker daemon will be used by act_runner. - If `docker_host` is **empty**, act_runner will find an available docker host automatically. - If `docker_host` is **"-"**, act_runner will find an available docker host automatically, but the docker host won't be mounted to the job containers and service containers. - If `docker_host` is **not empty or "-"**, the specified docker host will be used. An error will be returned if it doesn't work.
Zettat123 added 1 commit 2023-06-28 10:18:14 +00:00
set ContainerDaemonSocket as docker_host
All checks were successful
checks / check and test (pull_request) Successful in 1m21s
e5e4e3a113
Zettat123 added the
kind
bug
label 2023-06-28 10:18:37 +00:00
Zettat123 added 1 commit 2023-06-29 04:28:22 +00:00
add TODO
All checks were successful
checks / check and test (pull_request) Successful in 41s
06f0ce2f51
Zettat123 changed title from WIP: Improve the usage of `docker_host` configuration to Improve the usage of `docker_host` configuration 2023-06-29 04:34:29 +00:00
Zettat123 changed title from Improve the usage of `docker_host` configuration to Improve the usage of `docker_host` configuration 2023-06-29 04:34:30 +00:00
Zettat123 changed title from Improve the usage of `docker_host` configuration to WIP: Improve the usage of `docker_host` configuration 2023-06-29 10:27:33 +00:00
Zettat123 added 1 commit 2023-06-30 02:53:45 +00:00
simplify finding docker socket
All checks were successful
checks / check and test (pull_request) Successful in 38s
c6d75e0ab2
Zettat123 changed title from WIP: Improve the usage of `docker_host` configuration to Improve the usage of `docker_host` configuration 2023-06-30 03:18:27 +00:00
wolfogre approved these changes 2023-06-30 03:41:17 +00:00
wolfogre left a comment
Owner

LGTM, just some a problem about code style.

LGTM, just some a problem about code style.
@ -0,0 +8,4 @@
"os"
)
func getDockerSocketPath(configDockerHost string) (string, error) {
Owner

The functions body code smells bad.

Please change it to

if xx {
	return
}
if yy {
	return
}
return 
The functions body code smells bad. Please change it to ``` if xx { return } if yy { return } return ```
Author
Member

fixed in ba20ddb2f7

fixed in ba20ddb2f7789bfcdd36658dddb17d54419d0a8e
Zettat123 marked this conversation as resolved
Zettat123 added 1 commit 2023-06-30 03:52:19 +00:00
move getDockerSocketPath to daemon.go
All checks were successful
checks / check and test (pull_request) Successful in 3m14s
ba20ddb2f7
wolfogre merged commit ccc27329dc into main 2023-06-30 04:00:07 +00:00
Zettat123 deleted branch improve-docker-host 2023-06-30 04:03:10 +00:00
Sign in to join this conversation.
No description provided.