1
0
镜像自地址 https://github.com/tuna/tunasync.git 已同步 2025-12-06 14:36:47 +00:00

feat(worker): Implemented docker executor, close #55

if docker is enabled in configure file and `docker_image` is set on mirror config, the command would

be executed via `docker run ...`
这个提交包含在:
bigeagle
2016-12-10 02:44:45 +08:00
父节点 21c832c8fb
当前提交 ebd462be36
共有 6 个文件被更改,包括 274 次插入12 次删除

查看文件

@@ -38,6 +38,7 @@ type Config struct {
Server serverConfig `toml:"server"`
Cgroup cgroupConfig `toml:"cgroup"`
ZFS zfsConfig `toml:"zfs"`
Docker dockerConfig `toml:"docker"`
Include includeConfig `toml:"include"`
Mirrors []mirrorConfig `toml:"mirrors"`
}
@@ -74,6 +75,12 @@ type cgroupConfig struct {
Group string `toml:"group"`
}
type dockerConfig struct {
Enable bool `toml:"enable"`
Volumes []string `toml:"volumes"`
Options []string `toml:"options"`
}
type zfsConfig struct {
Enable bool `toml:"enable"`
Zpool string `toml:"zpool"`
@@ -111,6 +118,10 @@ type mirrorConfig struct {
Username string `toml:"username"`
Password string `toml:"password"`
Stage1Profile string `toml:"stage1_profile"`
DockerImage string `toml:"docker_image"`
DockerVolumes []string `toml:"docker_volumes"`
DockerOptions []string `toml:"docker_options"`
}
// LoadConfig loads configuration