Ignoring .dockerignore

docker

#1

My .dockerignore is being ignored and it’s driving me crazy. My docker file has the following COPY statement

WORKDIR /gg-dash
COPY . /gg-dash

…and after I do a RUN ls -l just to see what got copied.

My .dockerignore file (in root next to Dockerfile) has the following statements:

**/.DS_Store
dist
node_modules
splash
.resin-sync.yml
local.sh
README.md

…but I’m still getting everything copied (including .git) - Am I doing something wrong here?

Cheers,
Chris


#5

Hey @chrisallmark this is because .dockerignore files are not supported on the resin build servers. I will raise this item for discussion and update this thread after this.


#8

Cool. Thanks for the update.


#9

I second this request! Would love to see this also on cli build feature (i.e., resin build).


#11

The .dockerignore seems to be ignored for me during resin local push builds, as well. Is that the case?

It’s mentioned in documentation but I keep ending up with explicitly ignored files on the host. .resin-sync.yml and --ignore don’t work either.