diff --git a/docs/book/src/component-config-tutorial/testdata/project/.dockerignore b/docs/book/src/component-config-tutorial/testdata/project/.dockerignore index 243f81a5080..0f046820f18 100644 --- a/docs/book/src/component-config-tutorial/testdata/project/.dockerignore +++ b/docs/book/src/component-config-tutorial/testdata/project/.dockerignore @@ -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/ diff --git a/docs/book/src/cronjob-tutorial/testdata/project/.dockerignore b/docs/book/src/cronjob-tutorial/testdata/project/.dockerignore index 243f81a5080..0f046820f18 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/.dockerignore +++ b/docs/book/src/cronjob-tutorial/testdata/project/.dockerignore @@ -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/ diff --git a/docs/book/src/multiversion-tutorial/testdata/project/.dockerignore b/docs/book/src/multiversion-tutorial/testdata/project/.dockerignore index 243f81a5080..0f046820f18 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/.dockerignore +++ b/docs/book/src/multiversion-tutorial/testdata/project/.dockerignore @@ -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/ diff --git a/pkg/plugins/golang/v3/scaffolds/internal/templates/dockerignore.go b/pkg/plugins/golang/v3/scaffolds/internal/templates/dockerignore.go index 7aa0150303d..45be541be72 100644 --- a/pkg/plugins/golang/v3/scaffolds/internal/templates/dockerignore.go +++ b/pkg/plugins/golang/v3/scaffolds/internal/templates/dockerignore.go @@ -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/ ` diff --git a/testdata/project-v3-addon/.dockerignore b/testdata/project-v3-addon/.dockerignore index 243f81a5080..0f046820f18 100644 --- a/testdata/project-v3-addon/.dockerignore +++ b/testdata/project-v3-addon/.dockerignore @@ -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/ diff --git a/testdata/project-v3-config/.dockerignore b/testdata/project-v3-config/.dockerignore index 243f81a5080..0f046820f18 100644 --- a/testdata/project-v3-config/.dockerignore +++ b/testdata/project-v3-config/.dockerignore @@ -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/ diff --git a/testdata/project-v3-multigroup/.dockerignore b/testdata/project-v3-multigroup/.dockerignore index 243f81a5080..0f046820f18 100644 --- a/testdata/project-v3-multigroup/.dockerignore +++ b/testdata/project-v3-multigroup/.dockerignore @@ -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/ diff --git a/testdata/project-v3/.dockerignore b/testdata/project-v3/.dockerignore index 243f81a5080..0f046820f18 100644 --- a/testdata/project-v3/.dockerignore +++ b/testdata/project-v3/.dockerignore @@ -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/