From aacb2960c93aa743ecbc22e6ed570e23b8f1e860 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 10 Jan 2020 18:45:28 +0100 Subject: [PATCH] update .dockerignore to prevent '-unsupported' builds When building the daemon inside the development container, without bind-mounting the source-code, the git status was marked "dirty", because the `.dockerignore` and `Dockerfile` were not copied into the image (due to them being excluded by the .dockerignore): ``` make shell hack/make.sh binary ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GITCOMMIT = 98276a3439-unsupported The version you are building is listed as unsupported because there are some files in the git repository that are in an uncommitted state. Commit these changes, or add to .gitignore to remove the -unsupported from the version. Here is the current list: D .dockerignore D Dockerfile ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` This patch removes those files from .dockerignore so that the git status is not marked "dirty". Excluding the files through `.dockerignore` is only useful to prevent busting the build-cache in corner-cases where the files are modified without actual changes (e.g. whitespace-only changes, comment edited), but should not be a big issue in practice. With this patch applied: ``` make shell hack/make.sh binary Removing bundles/ ---> Making bundle: binary (in bundles/binary) Building: bundles/binary-daemon/dockerd-dev GOOS="" GOARCH="" GOARM="" Created binary: bundles/binary-daemon/dockerd-dev Copying nested executables into bundles/binary-daemon bundles/binary-daemon/dockerd-dev --version Docker version dev, build 7812dd38c8 ``` Signed-off-by: Sebastiaan van Stijn --- .dockerignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index b8f478b4c1..a8eeb4b41f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,8 +1,6 @@ -.dockerignore .git .go-pkg-cache .gopath bundles -Dockerfile vendor/pkg