Skip to content

Commit 16fab88

Browse files
authored
Merge pull request #55 from dokku-community/48-respect-image-digest
fix: use herokuish image digest when computing the sha of the apt commands
2 parents f692ebd + 8e1b5e3 commit 16fab88

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal-functions

+4-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ fn-apt-fetch-sha() {
4040
return
4141
fi
4242

43-
echo -n "$(<$PLUGIN_AVAILABLE_PATH/apt/plugin.toml)${DOKKU_IMAGE}${CONTENT}" | sha256sum | cut -d " " -f 1
43+
local image_digest
44+
image_digest="$("$DOCKER_BIN" image inspect --format='{{index .RepoDigests 0}}' "$DOKKU_IMAGE" 2>/dev/null || echo "$DOKKU_IMAGE")"
45+
46+
echo -n "$(<$PLUGIN_AVAILABLE_PATH/apt/plugin.toml)${image_digest}${CONTENT}" | sha256sum | cut -d " " -f 1
4447
}
4548

4649
fn-apt-populate-work-dir() {

0 commit comments

Comments
 (0)