Skip to content

possible to have Dockerfile FROM point to another fig-defined service? #583

Closed

Description

@jokeyrhyme

I have a use case where the images should not be pushed to a registry, but there is a high amount of duplication between the Dockerfiles for 2 or more services in my fig.yml.

Is it possible to have fig pre-parse the Dockerfiles it is about to use so that it can fix up references between images created for fig-defined services as in the below example?

fig.yml

a:
    build: ./a/

b:
    build ./b/

b/Dockerfile

FROM a
# OR
FROM fig://a
# OR
FROM project_a

# ...

Activity

  1. jokeyrhyme commented on Oct 24, 2014

    @jokeyrhyme
    Author

    The expected behaviour would be to determine which image that service is using (or would use if it were instantiated) and replace the FROM reference accordingly to point to the indicated service's image.

  2. jokeyrhyme commented on Oct 30, 2014

    @jokeyrhyme
    Author

    This wouldn't be necessary at all if upstream docker supported IMPORT or INCLUDE statements: moby/moby#735

  3. dnephin commented on Sep 18, 2015

    @dnephin

    I believe this is very similar to #295 and #610, going to close as a duplicate.

    I've also linked this up from #1455

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions