Skip to content

Dockerfile enhancements #19

Description

@JBurkinshaw

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions