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

Unnecessarily large docker images #4

Open
koonpeng opened this issue Jul 1, 2022 · 0 comments
Open

Unnecessarily large docker images #4

koonpeng opened this issue Jul 1, 2022 · 0 comments

Comments

@koonpeng
Copy link

koonpeng commented Jul 1, 2022

Most docker images are based off build-rmf and just changes the entry point. It makes every image include all the rmf components it doesn't need, causing every image to be 5gb+ in size.

Some suggestions to optimize the images:

  • builder-rmf can build all rmf components, but instead of installing them directly, it should output an apt repo. Children layers can copy the repo and use apt to install only the required packages, ideally using ros:humble-ros-core as the base image. The builder can also export the repo to a temporary volume or a external apt repository to optimize build time.
    • Alternatively, the builder should only install dependencies, move building and installing to the children layers. This is less optimal because the children layer will contain the sources and build dependencies.
  • Pin all sources to make builds reproducible. This also allows layer caching to work. It should be fine doing the clone inside the builder as long as the sources are pinned.
  • Separate the simulation components, a "real" deployment shouldn't need simulations so the main rmf builder shouldn't include them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant