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

Externalize netbox download #164

Merged
merged 5 commits into from Oct 14, 2019
Merged

Conversation

cimnine
Copy link
Collaborator

@cimnine cimnine commented Oct 13, 2019

These changes have the goal to speed up the build because the Docker caching can better be leveraged. They also reduces the Docker Image's size from ~580 MB to ~280MB.

Drawbacks

It will be required to use the build.sh script to build containers. A 'regular' docker build or docker-compose build will not work any longer.

Benefits

  • Improved build speed (confirmed, especially with repeating builds)
  • Smaller image size (confirmed)
  • Instant releases of new netbox-docker features (instead of having to wait until the next Netbox release) (unconfirmed)

TODO

  • Experiment with getting the code with git instead of removing the download
  • Test with Docker Hub's build system

This changes the build process even further. Instead
f using `wget` to fetch the current code, `git` is used.
This allows for faster switching between branches,
because only the differences between them have to be
fetched from the server.

But the main advantage is that the build cache can
finally be used as designed by Docker. Repetitive
builds are very fast now. This is also true between
branches and tags, as long as the `requirements.txt`
file doesn't change.
@cimnine cimnine mentioned this pull request Oct 14, 2019
4 tasks
@cimnine cimnine changed the title WIP: Externalize netbox download with wget Externalize netbox download with wget Oct 14, 2019
The Docker Hub build system runs on Ubuntu Xenial containers.
Xenial's git is 2.7.4, which does not know the `-P` flag yet.
@cimnine cimnine changed the title Externalize netbox download with wget Externalize netbox download Oct 14, 2019
@cimnine cimnine merged commit f074b3c into multistage-build Oct 14, 2019
@cimnine cimnine deleted the externalize-netbox-download branch October 14, 2019 22:33
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

Successfully merging this pull request may close these issues.

None yet

1 participant