Skip to content

Commit

Permalink
bug fix: rsync can access the exclude file in Docker (close tuna#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
z4yx committed Jun 3, 2020
1 parent 85ce9c1 commit 198afa7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions worker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ func newDockerHook(p mirrorProvider, gCfg dockerConfig, mCfg mirrorConfig) *dock
volumes := []string{}
volumes = append(volumes, gCfg.Volumes...)
volumes = append(volumes, mCfg.DockerVolumes...)
if len(mCfg.ExcludeFile) > 0 {
arg := fmt.Sprintf("%s:%s:ro", mCfg.ExcludeFile, mCfg.ExcludeFile)
volumes = append(volumes, arg)
}

options := []string{}
options = append(options, gCfg.Options...)
Expand Down

0 comments on commit 198afa7

Please sign in to comment.