Skip to content

Commit

Permalink
Merge pull request #2081 from busser/fix/dockerignore
Browse files Browse the repository at this point in the history
🐛 fix: ignore non-go files during Docker build
  • Loading branch information
k8s-ci-robot authored Jun 16, 2021
2 parents 01c9d5b + a42a397 commit 2f8940f
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore all files which are not go type
!**/*.go
!**/*.mod
!**/*.sum
# Ignore build and test binaries.
bin/
testbin/
7 changes: 3 additions & 4 deletions docs/book/src/cronjob-tutorial/testdata/project/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore all files which are not go type
!**/*.go
!**/*.mod
!**/*.sum
# Ignore build and test binaries.
bin/
testbin/
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore all files which are not go type
!**/*.go
!**/*.mod
!**/*.sum
# Ignore build and test binaries.
bin/
testbin/
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ func (f *DockerIgnore) SetTemplateDefaults() error {
}

const dockerignorefileTemplate = `# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore all files which are not go type
!**/*.go
!**/*.mod
!**/*.sum
# Ignore build and test binaries.
bin/
testbin/
`
7 changes: 3 additions & 4 deletions testdata/project-v3-addon/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore all files which are not go type
!**/*.go
!**/*.mod
!**/*.sum
# Ignore build and test binaries.
bin/
testbin/
7 changes: 3 additions & 4 deletions testdata/project-v3-config/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore all files which are not go type
!**/*.go
!**/*.mod
!**/*.sum
# Ignore build and test binaries.
bin/
testbin/
7 changes: 3 additions & 4 deletions testdata/project-v3-multigroup/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore all files which are not go type
!**/*.go
!**/*.mod
!**/*.sum
# Ignore build and test binaries.
bin/
testbin/
7 changes: 3 additions & 4 deletions testdata/project-v3/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file
# Ignore all files which are not go type
!**/*.go
!**/*.mod
!**/*.sum
# Ignore build and test binaries.
bin/
testbin/

0 comments on commit 2f8940f

Please sign in to comment.