Skip to content

Commit 13fcf40

Browse files
committed
more dockerignore
1 parent f750f16 commit 13fcf40

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.dockerignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
# we want to get the git commit SHA but not all the binary repo data
22
.git/objects/pack
33
bin/
4+
**/*.pyc
45
.vagrant
56
vagrant/
67
docs/
78
scripts/gobgp
9+
# this is the dockerfile for binary compilation, other dockerfiles
10+
# may want archive artifacts, but this one does not
811
*.tar
12+
**/*.tar.gz
913
*.bz2
1014
# export from a docker container, no need to copy into any docker containers
1115
install/v2plugin/rootfs

scripts/getGitVersion.sh

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ NIGHTLY_RELEASE=${NIGHTLY_RELEASE:-}
77

88
# calculate version
99
if command -v git &>/dev/null && git rev-parse &>/dev/null; then
10-
GIT_COMMIT=$(git describe --tags --always 2>/dev/null || echo unknown)
11-
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
12-
GIT_COMMIT="$GIT_COMMIT-unsupported"
13-
fi
14-
VERSION=$GIT_COMMIT
10+
VERSION=$(git describe --abbrev=7 --dirty=-unsupported --tags --always 2>/dev/null || echo unknown)
1511
else
1612
echo >&2 'error: unable to determine the git revision'
1713
exit 1

scripts/v2plugin_rootfs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ rm install/v2plugin/${TAR_FILE}
3232
id=$(docker create $DOCKER_IMAGE true)
3333

3434
# create the rootfs archive based on the created container contents
35-
sudo docker export "${id}" > install/v2plugin/${V2PLUGIN_TAR_FILENAME}
35+
docker export "${id}" > install/v2plugin/${V2PLUGIN_TAR_FILENAME}
3636

3737
# clean up created container
3838
docker rm -vf "${id}"

0 commit comments

Comments
 (0)