Skip to content

The generated Dockerfile is left in working directory when using FromFile  #280

@rjnilsson

Description

@rjnilsson

When using the FileBuilder/FromFile in combination with WorkingDirectory the copied Dockerfile seems to always get left in the working directory.

As I need to set the working directory to get the proper build context, this means that I now have an extra Dockerfile in my filesystem (as the build context is a step above the location of the Dockerfile in my case). This in turn means that I'm likely to commit that extra Dockerfile at some point.

Would it be possible to discard that generated Dockerfile during Dispose of the image? At least be able to do it by passing an extra argument to the FromFile method, or, maybe even better, add an explicit "WithBuildContext" method?

All this unless I've missed out on the option of just setting the build context? I really don't have a need for copying or modifying the Dockerfile; I only want to use an existing file and be able to pass build arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions