Skip to content

Separate image and image-dev make targets #1453

@BenjaminPelletier

Description

@BenjaminPelletier

Is your feature request related to a problem? Please describe.
Performing almost any action in this repo requires a docker image to be built. A while back, we improved rebuild behavior by adding a dummy image file that corresponded to when the image was last built to determine if a rebuild was necessary when an action needed a current docker image. More recently, we switched to building two images: a normal one for running utilities, and a dev one for performing dev operations like reformatting code and linting. Both these images are built in monitoring/build.sh, and both are tied to the image dummy file.

The current inefficiency is that these two images serve very different purposes and rarely (if ever) are both needed to perform a task. But, both are built for any task as they are not currently separable. Even though building an image is relatively fast when only changing content in the last few layers, it is still the slowest part of many small operations and building both images needlessly doubles the time required to perform those small operations.

Describe the solution you'd like
Track and build the normal image and dev images separately (presumably image and image-dev dummy files/make targets). Adjust the Makefile to correctly indicate dependencies so that only the image(s) necessary for the task are built when needed. This should result in, e.g., make format only building one image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions