Skip to content

Commit e73b156

Browse files
committed
Remove unused logic from incremental_load script
Removing the unused logic speeds up image loading significantly. Fixes #200.
1 parent d5f7eb4 commit e73b156

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

container/incremental_load.sh.tpl

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,6 @@ RUNFILES="${PYTHON_RUNFILES:-$(guess_runfiles)}"
2828

2929
DOCKER="${DOCKER:-docker}"
3030

31-
function list_diffids() {
32-
for image in $("${DOCKER}" images -aq 2> /dev/null);
33-
do
34-
for entry in $("${DOCKER}" inspect -f '{{json .RootFS.Layers}}' "${image}");
35-
do
36-
echo -n $entry | python -mjson.tool | grep sha256 | cut -d'"' -f 2 | cut -d':' -f 2
37-
done
38-
done
39-
}
40-
41-
# Fetch the diff ids of the layers loaded in the docker daemon already
42-
IMAGES=$(list_diffids | sort | uniq)
43-
IMAGE_LEN=$(for i in $IMAGES; do echo -n $i | wc -c; done | sort -g | head -1 | xargs)
44-
45-
[ -n "$IMAGE_LEN" ] || IMAGE_LEN=64
46-
4731
# Create temporary files in which to record things to clean up.
4832
TEMP_FILES="$(mktemp -t 2>/dev/null || mktemp -t 'rules_docker_files')"
4933
TEMP_IMAGES="$(mktemp -t 2>/dev/null || mktemp -t 'rules_docker_images')"

0 commit comments

Comments
 (0)