Docker ~ For example, Doc kerignore, dockerignore
Back to directory
Recently, I have been focusing on docker development, but I found a problem when using Dockerfile. When your release directory can only be obj \ Docker \ publish, but dockefile pointing to other directories does not recognize it, only prompt
I have found a lot of materials and no one has ever said this, so I 'd better study it myself!
When I found this .doc kerignore file in the vsresolution, it was a miracle! (You cannot see it on VS in the solution)
I personally think that dockerignore is mainly used in the rejected path! The path of is accepted, but not in it.
In the file manager, you can see
Then let's take a look at its content.
The answer is displayed. The first line of "*" indicates that all directories are rejected, and the second line is rejected "! "Indicates the acceptable path. Add our directory here, and then docker build will be OK.
OK. Deploy docker in your own way! I finally found the reason!
If you want to delete all directories, you only need to delete the .doc kerignore file. Note that it is not displayed on linux.
Back to directory