azure-docker-extension/op-uninstall.go

28 строки
632 B
Go
Исходник Постоянная ссылка Обычный вид История

2015-04-27 21:56:49 +03:00
package main
import (
"os"
2015-09-16 00:56:25 +03:00
"github.com/Azure/azure-docker-extension/pkg/driver"
"github.com/Azure/azure-docker-extension/pkg/vmextension"
2015-04-27 21:56:49 +03:00
)
func uninstall(he vmextension.HandlerEnvironment, d driver.DistroDriver) error {
log.Println("++ uninstall docker")
if err := d.UninstallDocker(); err != nil {
return err
}
log.Println("-- uninstall docker")
log.Println("++ uninstall docker-compose")
if err := uninstallDockerCompose(d); err != nil {
return err
}
log.Println("++ uninstall docker-compose")
2015-04-27 21:56:49 +03:00
return nil
}
func uninstallDockerCompose(d driver.DistroDriver) error {
return os.RemoveAll(composeBinPath(d))
}