Skip to content

Commit

Permalink
Cleanup phase failed when using the same image for multiple component…
Browse files Browse the repository at this point in the history
…s due to a failure in removing the image (#22)

more than once. To fix this - ignored that specific issue "reference does not exist" when that error is returned
from the docker remove request
  • Loading branch information
shaharpx authored Aug 24, 2024
1 parent a70935a commit 3e7bba4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.9](https://github.com/PerimeterX/envite/compare/v0.0.8...v0.0.9)

### Fixed

- Cleanup phase failed when using the same image for multiple components due to a failure in removing the image
more than once. To fix this - ignored that specific issue "reference does not exist" when that error is returned
from the docker remove request

## [0.0.8](https://github.com/PerimeterX/envite/compare/v0.0.7...v0.0.8)

### Added
Expand Down
2 changes: 1 addition & 1 deletion docker/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (c *Component) Cleanup(ctx context.Context) error {

func (c *Component) removeImage(ctx context.Context) error {
_, err := c.cli.ImageRemove(ctx, c.imageCloneTag, image.RemoveOptions{})
if err != nil {
if err != nil && !strings.Contains(err.Error(), "reference does not exist") {
return err
}

Expand Down

0 comments on commit 3e7bba4

Please sign in to comment.