Skip to content
This repository was archived by the owner on Jul 12, 2022. It is now read-only.

Conversation

fabianofernandeszup
Copy link
Contributor

@fabianofernandeszup fabianofernandeszup commented Jul 31, 2020

- What I did
Added a command to completely remove the image from the embedded Docker after execution. It will never be reused and takes up a lot of space on the user's computer. Some with almost 2GB.
The current implementation removed only the container.

- How to verify it
Run any formula more than once and you will see that several builds with random ids are generated.
With this implementation, after the execution the image is removed as well as the container.

- Description for the changelog
Added a complete removal of the docker image after execution, to save disk space.

Examples of garbage images before implementation:

images-docker

@fabianofernandeszup fabianofernandeszup added 🪲 bug Report a bug encountered while operating Ritchie 2.0.0 labels Jul 31, 2020
@codecov-commenter
Copy link

Codecov Report

Merging #334 into ritchie-2.0.0 will decrease coverage by 0.02%.
The diff coverage is 41.66%.

Impacted file tree graph

@@                Coverage Diff                @@
##           ritchie-2.0.0     #334      +/-   ##
=================================================
- Coverage          65.21%   65.19%   -0.03%     
=================================================
  Files                 78       78              
  Lines               2550     2560      +10     
=================================================
+ Hits                1663     1669       +6     
- Misses               725      727       +2     
- Partials             162      164       +2     
Impacted Files Coverage Δ
pkg/credential/finder.go 68.42% <ø> (ø)
pkg/credential/settings.go 84.76% <0.00%> (-1.65%) ⬇️
pkg/formula/runner/post_run.go 50.00% <50.00%> (ø)
pkg/version/version.go 88.46% <100.00%> (ø)
pkg/formula/watcher/watcher.go 76.47% <0.00%> (+5.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ec1864e...24541c3. Read the comment docs.

@fabianofernandeszup fabianofernandeszup self-assigned this Jul 31, 2020
Copy link
Contributor

@sandokandias sandokandias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to write a test for this scenario?

@sandokandias sandokandias added 🔨 improvement Improvement in features and removed 🪲 bug Report a bug encountered while operating Ritchie labels Jul 31, 2020
@sandokandias sandokandias changed the title [Fix] Remove image docker post run Remove image docker post run Jul 31, 2020
@viniciussousazup
Copy link
Contributor

this pr https://github.com/ZupIT/ritchie-cli/pull/332/files already fix this bug

@viniciussousazup viniciussousazup added the duplicate This issue or pull request already exists label Jul 31, 2020
@sandokandias
Copy link
Contributor

Closed in favor of #332

@fabianofernandeszup
Copy link
Contributor Author

Nice.

@fabianofernandeszup fabianofernandeszup deleted the remove-image-docker-post-run branch June 7, 2021 22:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists 🔨 improvement Improvement in features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants