Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker build system eats up disk space on local builds machine #119

Closed
paidforby opened this issue Dec 15, 2017 · 6 comments
Closed

docker build system eats up disk space on local builds machine #119

paidforby opened this issue Dec 15, 2017 · 6 comments
Labels

Comments

@paidforby
Copy link

Can we add an option to automatically clean up the docker container after successfully building the firmware? Should this go at the end of the entrypoint.sh or must it be run outside the container? Ideally, it would run only on a "successful" build and would only delete or modify the container and image just used to build that image.

@paidforby
Copy link
Author

Broadening scope of this issue:
After running sudowrt firmware build "the easy way" three or four times, my builds machine runs out of disk space. This is also related to #111 since I suspect this with be an issue on a dedicated builds machine. I will spin up a clean builds server to see if I see the same behavior there.

@paidforby paidforby changed the title auto clean-up docker container on successful build docker build system eats up disk space on local builds machine Mar 7, 2018
@paidforby paidforby added bug and removed enhancement labels Mar 7, 2018
@gobengo
Copy link
Contributor

gobengo commented Mar 7, 2018

Would adding --rm to the docker run ... command in the README help with what you're talking about?

docker run -v $PWD/firmware_images:/firmware_images sudomesh/sudowrt-firmware:0.2.1 --rm

Usually you don't want to do this in the entrypoint, because otherwise you have erased information that might be useful to go explore when debugging failed (or even successful) docker runs

@paidforby
Copy link
Author

Maybe? I will try another build later and see it if helps, thanks for the tip

paidforby pushed a commit that referenced this issue Mar 10, 2018
@paidforby
Copy link
Author

Thanks for that tip @gobengo That appears to solve my problem, however, the build fails on the cheapest digital ocean droplet (25GB storage) because it runs out of space (it also takes insanely long). Any ideas? Should I just build the "hard way" since I'm spinning up a DO droplet anyway? Maybe I could create the droplet from our docker hub image?

@gobengo
Copy link
Contributor

gobengo commented Mar 11, 2018 via email

@paidforby
Copy link
Author

Since learning more about the ways of docker through reworking the build process in #137, I'm considering this issue closed. I probably just need to be more careful about destroying containers after use and deleting images after pulling/building. Thanks for the help @gobengo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants