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

Dockerfile enhancements #19

Open
JBurkinshaw opened this issue Aug 4, 2021 · 0 comments
Open

Dockerfile enhancements #19

JBurkinshaw opened this issue Aug 4, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@JBurkinshaw
Copy link
Collaborator

JBurkinshaw commented Aug 4, 2021

Update oaff/testing/Dockerfile to benefit from a multistage build and decrease time taken for tests to run. Explanation from @cuttlefish in this PR:

The testing Dockerfile seems to inherit from the main image, then install a bunch of dependencies. That'll be pretty slow. All of the test requirements will need to be installed every time a single file changes in the base image.
A multistage build would be a lot faster, but I'm not sure how much time you have to put into this.

It is also worth considering a multistage build in /Dockerfile:

  • The first stage would build the Python dependencies with the required OS dependencies
  • The second stage would create an image containing the relevant built python dependencies, and runtime OS dependencies curl, but none of the dependencies from the first stage (libpq-dev, python3-pip, python3-psycopg2).
@JBurkinshaw JBurkinshaw added the enhancement New feature or request label Aug 4, 2021
@JBurkinshaw JBurkinshaw self-assigned this Aug 4, 2021
@JBurkinshaw JBurkinshaw changed the title Enhance test Dockerfile Dockerfile enhancements Aug 5, 2021
@JBurkinshaw JBurkinshaw removed their assignment Aug 10, 2021
@JBurkinshaw JBurkinshaw added this to the v0.1.0 milestone Aug 10, 2021
@JBurkinshaw JBurkinshaw self-assigned this Aug 10, 2021
@JBurkinshaw JBurkinshaw removed their assignment Aug 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant