--ignore-permissions flag to `docker build` now ignores files that cannot be accessed.

Adds an `--ignore-permissions` flag to `docker build` to ignore permissions errors while creating the context to upload.

Resolves #6521.
I'm not sure what you're trying to do here. You're not using `file` apart from closing it. Why?
Also you're silencing the err from os.Open.