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

Changes to Dockerfile to make the build faster #489

Merged
merged 1 commit into from
Aug 19, 2016

Conversation

rfdrake
Copy link
Contributor

@rfdrake rfdrake commented Aug 19, 2016

To download a new version with docker, I've been running

git pull
docker-compose build --no-cache

This is slow, but no-cache is needed so that "git clone" pulls the
latest copy.

Most of the slowness comes from pulling down apt files each time a
rebuild needs to be done. If we move that into a docker image then only
the local changes need to be rebuilt.

Further refinements could be done. If the python dependencies that are
brought in from requirements.txt could be moved to an image then nothing
would change between updates as long as dependant versions hadn't
changed. This would probably be more trouble than it's worth, unless
you're recreating netbox containers 10-20 times a day.

To download a new version with docker, I've been running

	git pull
	docker-compose build --no-cache

This is slow, but no-cache is needed so that "git clone" pulls the
latest copy.

Most of the slowness comes from pulling down apt files each time a
rebuild needs to be done.  If we move that into a docker image then only
the local changes need to be rebuilt.

Further refinements could be done.  If the python dependencies that are
brought in from requirements.txt could be moved to an image then nothing
would change between updates as long as dependant versions hadn't
changed.  This would probably be more trouble than it's worth, unless
you're recreating netbox containers 10-20 times a day.
@jeremystretch jeremystretch merged commit fa79014 into netbox-community:develop Aug 19, 2016
@jeremystretch jeremystretch mentioned this pull request Sep 13, 2016
if-fi pushed a commit to if-fi/netbox that referenced this pull request Oct 1, 2016
Changes to Dockerfile to make the build faster
@lock lock bot locked as resolved and limited conversation to collaborators Jan 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants