Skip to content

Add documentation on ** globs supported by new --parents feature #24308

@snickell

Description

@snickell

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

I can't find what I'm looking for

Description

I believe the documentation for the new COPY --parents feature is missing documentation that ** globs are now supported.

See: https://docs.docker.com/reference/dockerfile/#copy---parents, which does not mention ** globs, although they do work.

This was documented with the 1.7 labs blog announcement of --parents:
Image

I have tested that COPY --parents with ** globs DOES work, so its an undocumented feature currently, but an extremely useful one, very near essential.

Location

https://docs.docker.com/reference/dockerfile/#copy---parents

Suggestion

From the 1.7 labs blog post):

You can also use double-star wildcard (**) to match files under any directory structure. For example, to copy only the Go source code files anywhere in your build context, you can write:

COPY --parents **/*.go /to/dest/dir/

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/buildRelates to Dockerfiles or docker build commandstatus/triageNeeds triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions