2015-04-27 21:56:49 +03:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2015-09-17 21:30:33 +03:00
|
|
|
"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")
|
2015-09-17 21:30:33 +03:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
2015-09-17 21:30:33 +03:00
|
|
|
|
|
|
|
func uninstallDockerCompose(d driver.DistroDriver) error {
|
|
|
|
return os.RemoveAll(composeBinPath(d))
|
|
|
|
}
|