Skip to content

Use output from other builds in target Dockerfile #21

@solsson

Description

@solsson

This is a discussion on how build-contract relates to some core Docker design decisions.

Example: We have a FROM nginx build that needs to include a js file built with webpack, i.e. a quite lengthy Node.js/NPM execution. A typical build server like Jenkins would have Node.js installed locally and produce the js in a step prior to running docker build on the target image. A FROM node build could easily do the build, but we wouldn't get the file out of it, at least not at build time.

The target build could install the dependency + run the build + clean up, but that's quite messy and needs to make assumptions about the nginx image.

Relates to moby/moby#13026, where "Multi-stage building" looks like a similar concept.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No 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