This commit is contained in:
Jesse Duffield 2019-06-07 14:59:31 +10:00
parent 1f5df32141
commit 07a01d2511
2 changed files with 7 additions and 0 deletions

View file

@ -354,3 +354,9 @@ func (c *DockerCommand) PruneImages() error {
_, err := c.Client.ImagesPrune(context.Background(), filters.Args{})
return err
}
// PruneContainers prunes containers
func (c *DockerCommand) PruneContainers() error {
_, err := c.Client.ContainersPrune(context.Background(), filters.Args{})
return err
}

View file

@ -153,6 +153,7 @@ func GetDefaultConfig() UserConfig {
ConfirmOnQuit: false,
CommandTemplates: CommandTemplatesConfig{
RestartService: "docker-compose restart {{ .Name }}",
RebuildService: "docker-compose up -d --build {{ .Name }}",
DockerCompose: "apdev compose",
StopService: "apdev stop {{ .Name }}",
ServiceLogs: "apdev logs {{ .Name }}",