|
|
@@ -258,7 +258,11 @@ func (cs *aciContainerService) Logs(ctx context.Context, containerName string, r
|
|
|
}
|
|
|
|
|
|
func (cs *aciContainerService) Delete(ctx context.Context, containerID string, _ bool) error {
|
|
|
- cg, err := deleteACIContainerGroup(ctx, cs.ctx, containerID)
|
|
|
+ groupName, containerName := getGroupAndContainerName(containerID)
|
|
|
+ if groupName != containerID {
|
|
|
+ return errors.New(fmt.Sprintf(`cannot delete service "%s" from compose app "%s", you must delete the entire compose app with docker compose down`, containerName, groupName))
|
|
|
+ }
|
|
|
+ cg, err := deleteACIContainerGroup(ctx, cs.ctx, groupName)
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|