Skip to content

is there an equivalent of --file as used through the Docker cli? #68

Description

@gregcusack

In the docker reference page they outline the ability to pass in a path to a dockerfile using --file. So from the command line we can run something like:

docker build -t <tag-name> -f <path-to-docker-file> <path-to-context>

I can't seem to find this functionality or the equivalent implementation. Also could have totally just missed it.

I would love to utilize this functionality since I have a Dockerfile in a large repository and Images::build() and Images::build_par() are too slow. So would love to have a Dockerfile in its own directory within the large repo and build an image as I can through the command line like:

docker build -t <tag-name> -f <large-repo/dockerfile-repo/Dockerfile> <large-repo>

Does this functionality exist? Or is there an equivalent way of doing this? Once again, I may have missed it in the docs/code, so my apologies if that is the case!
Thank you!

  • Greg

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