Skip to content

Unable to unignore using wildcards with .dockerignore #23693

@batmat

Description

@batmat

Output of docker version:

Client:
 Version:      1.11.2
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   b9f10c9
 Built:        Wed Jun  1 21:39:21 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.11.2
 API version:  1.23
 Go version:   go1.5.4
 Git commit:   b9f10c9
 Built:        Wed Jun  1 21:39:21 2016
 OS/Arch:      linux/amd64

Output of docker info:

Containers: 30
 Running: 0
 Paused: 0
 Stopped: 30
Images: 75
Server Version: 1.11.2
Storage Driver: overlay
 Backing Filesystem: extfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge null host
Kernel Version: 4.5.6-200.fc23.x86_64
Operating System: Fedora 23 (Twenty Three)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.55 GiB
Name: nhuitre.batmat
ID: Y4LM:JCSQ:E2KZ:FWYU:OJ2R:CUGN:MRQD:FCAG:QXHL:4BPO:UC3K:OCVP
Docker Root Dir: /var/lib/docker
Debug mode (client): false
Debug mode (server): false
Username: batmat
Registry: https://index.docker.io/v1/

Additional environment details (AWS, VirtualBox, physical, etc.):

Fedora 23. Bare metal.

Steps to reproduce the issue:

  1. Clone https://github.com/batmat/docker-wildcard-unignore
  2. Try to build it

Describe the results you received:

$ docker build .
Sending build context to Docker daemon  5.12 kB
Step 1 : FROM alpine
 ---> f70c828098f5
Step 2 : ADD README.adoc /whatever
 ---> Using cache
 ---> cb77e9745763
Step 3 : ADD bam/target/thefile.ext /pof
lstat bam/target/thefile.ext: no such file or directory

As you can, simple unignore wildcard !README.* is accepted, when !*/target/*.ext isn't.

Describe the results you expected:

As when using an ignore wildcard, adding a unignore (starting with !) should be able to unignore some files/directories to stay consistent.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions