Skip to content

Commit 8e1b5e3

Browse files
committed
fix: use herokuish image digest when computing the sha of the apt commands
Previously, we would take the herokuish image as is, meaning we would sometimes have stale base images when herokuish was upgraded. This new path avoids this by taking a sha of the base image, and then re-applying the apt commands as expected. Closes #48
1 parent f692ebd commit 8e1b5e3

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)