Merge pull request #9486 from thaJeztah/release_dockerignore

release: add .dockerignore to fix repeated builds
This commit is contained in:
Phil Estes 2023-12-08 10:37:11 -05:00 committed by GitHub
commit 4a6a5af8d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View File

@ -56,7 +56,7 @@ RUN \
# check git working tree after build # check git working tree after build
RUN \ RUN \
export GIT_STATUS_OUTPUT=$(git status --porcelain) && \ export GIT_STATUS_OUTPUT=$(git status --porcelain) && \
test -z $GIT_STATUS_OUTPUT || (echo $GIT_STATUS_OUTPUT && exit 1) test -z $GIT_STATUS_OUTPUT || (echo "repository contains uncommitted changes" && exit 1)
FROM scratch AS release FROM scratch AS release
COPY --from=target /go/src/github.com/containerd/containerd/releases/ / COPY --from=target /go/src/github.com/containerd/containerd/releases/ /

View File

@ -0,0 +1,19 @@
# Exclude files that may cause cache-busts. These are generally expected
# to be in a global .gitignore, but still can cause the build-cache to
# be invalidated.
**/.DS_Store
# exclusions below are copied from .gitignore at the root of the repository
# when updating, consider updating .gitignore accordingly.
/bin/
/man/
coverage.txt
profile.out
containerd.test
_site/
# Allow repeated builds without copying back previous builds
releases/*.tar.gz
releases/*.tar.gz.sha256sum
_output/
.vagrant/