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

Re-organize Dockerfile to improve incremental builds. #10212

Merged
merged 1 commit into from Mar 8, 2019

Conversation

Projects
None yet
3 participants
@BenLubar
Copy link
Contributor

BenLubar commented Mar 7, 2019

  • Always run apt update before any other apt command. (This fixes
    incremental builds failing if a remote package is updated.)
  • Only copy dependency lists before installing dependencies. (This means
    editing code doesn't force all dependencies to be re-downloaded.)
  • Delete cache in the same layer that it is created. (Otherwise,
    deleting cache increases the size of the image on non-squashed
    builds.)
  • Move the installation of some static dependencies to before Mastodon
    code is imported to Docker.
Re-organize Dockerfile to improve incremental builds.
- Always run apt update before any other apt command. (This fixes
  incremental builds failing if a remote package is updated.)
- Only copy dependency lists before installing dependencies. (This means
  editing code doesn't force all dependencies to be re-downloaded.)
- Delete cache in the same layer that it is created. (Otherwise,
  deleting cache *increases* the size of the image on non-squashed
  builds.)
- Move the installation of some static dependencies to *before* Mastodon
  code is imported to Docker.
@Gargron

This comment has been minimized.

Copy link
Member

Gargron commented Mar 7, 2019

I believe this is the kind of back-and-forth I was warning against @Sir-Boops #10100

@BenLubar

This comment has been minimized.

Copy link
Contributor Author

BenLubar commented Mar 7, 2019

This runs all the same code, just in a different order that's friendlier to the build cache.

@Sir-Boops

This comment has been minimized.

Copy link
Contributor

Sir-Boops commented Mar 7, 2019

I question the weird way this COPYs the masto src around but other then that It's a nice cleanup UwU

I don't know what you mean about 'back-and-forth'

@Gargron

Gargron approved these changes Mar 7, 2019

@Gargron Gargron merged commit d36fcb5 into tootsuite:master Mar 8, 2019

11 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: check-i18n Your tests passed on CircleCI!
Details
ci/circleci: install Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.4 Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.5 Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.6 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.4 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.5 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.6 Your tests passed on CircleCI!
Details
ci/circleci: test-webui Your tests passed on CircleCI!
Details
codeclimate All good!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.