Skip to content

Commit

Permalink
Include the vendor directory when copying source in to Docker (#12305)
Browse files Browse the repository at this point in the history
This change updates the `.dockerignore` file to no longer contain the `vendor/`
directory. When a Go project provides a `vendor/` directory within the
repository, the best practice is to build that project using their vendored
dependencies. By putting it in the `.dockerignore` file we prevent consumers
from easily doing that.

The `vendor/` directory is used to include all of the dependencies needed to
build a project. This makes it so that we can reproducibly build the project, at
any given commit, because the dependencies will always be present. Also, using
the vendor directory avoids us needing to continually re-download all the
dependencies, and it protects us from build failures if GitHub is down or a
dependency gets removed or renamed.

In addition to the change above, this also removes an extra `/tmp` entry from
the `.dockerignore` file.

Fixes #12304

Signed-off-by: Tim Heckman <t@heckman.io>
  • Loading branch information
theckman authored and torkelo committed Jun 18, 2018
1 parent 6782be8 commit a2ff762
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .dockerignore
Expand Up @@ -11,8 +11,5 @@ dump.rdb
node_modules
/local
/tmp
/vendor
*.yml
*.md
/vendor
/tmp

0 comments on commit a2ff762

Please sign in to comment.