Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.dockerignore: !**/file doesn't work for selected inclusion #42788

Open
rhaschke opened this issue Aug 26, 2021 · 5 comments
Open

.dockerignore: !**/file doesn't work for selected inclusion #42788

rhaschke opened this issue Aug 26, 2021 · 5 comments

Comments

@rhaschke
Copy link

I followed the docs and setup my .dockerignore like this:

# ignore everything
*
# but include all package.xml in any folder
!**/package.xml

However, these files are not added to the context as expected. Seems like ** doesn't work for inclusion?
Explicitly adding those files works as expected.

Docker version 20.10.7, build 20.10.7-0ubuntu1~20.04.1

rhaschke added a commit to moveit/moveit that referenced this issue Aug 26, 2021
rhaschke added a commit to moveit/moveit that referenced this issue Aug 26, 2021
rhaschke added a commit to moveit/moveit that referenced this issue Aug 26, 2021
rhaschke added a commit to moveit/moveit that referenced this issue Aug 26, 2021
rhaschke added a commit to ubi-agni/moveit that referenced this issue Aug 26, 2021
rhaschke added a commit to ubi-agni/moveit that referenced this issue Aug 26, 2021
@thaJeztah
Copy link
Member

Perhaps this is related to / may be resolved by #42758 and #42676

@aaronlehmann do you know?

@aaronlehmann
Copy link
Contributor

Yes, I believe it would be resolved by merging #42758.

@dermasmid
Copy link

i'm having the same issue on Ubuntu, this is my .dockerignore

**/node_modules
**/dist
.git


!**/node_modules/@tw

this works fine on macos but does not work on Ubuntu
this is my docker version

Client:
 Version:           20.10.12
 API version:       1.41
 Go version:        go1.17.3
 Git commit:        20.10.12-0ubuntu4
 Built:             Mon Mar  7 17:10:06 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.12
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.3
  Git commit:       20.10.12-0ubuntu4
  Built:            Mon Mar  7 15:57:50 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.5.9-0ubuntu3
  GitCommit:        
 runc:
  Version:          1.1.0-0ubuntu1
  GitCommit:        
 docker-init:
  Version:          0.19.0
  GitCommit:        

a fix for this will be much appreciated!

@thaJeztah
Copy link
Member

I don't think the changes related to this are in the 20.10 releases, but will be in the upcoming 22.06 release (a first beta build has been released in the test channel on download.docker.com; https://github.com/moby/moby/releases/tag/v22.06.0-beta.0)

@MatthiasKunnen
Copy link

MatthiasKunnen commented Jun 27, 2022

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

Successfully merging a pull request may close this issue.

5 participants