refactor: use new-style docker management commands
This PR uses the new syntax for commands introduced in Docker 1.13, making it a bit easier to understand just what a particular command is trying to do. This also pushes the long-form syntax for docker command flags, which are also easier to understand at a glance.
This commit is contained in:
@@ -24,7 +24,8 @@ func PurgeCache(appName string) error {
|
||||
dockerLabelArgs := fmt.Sprintf("--label=com.dokku.app-name=%s", appName)
|
||||
purgeCacheCmd := common.NewShellCmd(strings.Join([]string{
|
||||
common.DockerBin(),
|
||||
"run --rm", dockerLabelArgs, dokkuGlobalRunArgs,
|
||||
"container",
|
||||
"run", "--rm", dockerLabelArgs, dokkuGlobalRunArgs,
|
||||
"-v", strings.Join([]string{cacheHostDir, ":/cache"}, ""), image,
|
||||
`find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} ;`}, " "))
|
||||
purgeCacheCmd.Execute()
|
||||
|
||||
Reference in New Issue
Block a user