Skip to content

Commit

Permalink
Fix putManifest as docker requires the docker-content-digest header
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Jan 7, 2025
1 parent 1182210 commit 904135f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,13 @@ class OciRegistryHandler(
// OCI_IMAGE_MANIFEST_MEDIA_TYPE, DOCKER_MANIFEST_MEDIA_TYPE -> // TODO validate blob presence in config.digest and layers[].digest (size?)
// else -> return response.sendBadRequest()
// }
// TODO validate manifests json structure ignoring additional fields
storage.putManifest(repositoryName, actualDigest, data)
if (tag != null) {
storage.tagManifest(repositoryName, actualDigest, tag)
}
response.header(LOCATION, "/v2/$repositoryName/manifests/${tag ?: actualDigest}")
response.header("docker-content-digest", actualDigest.toString())
return response.status(CREATED).send()
}

Expand Down

0 comments on commit 904135f

Please sign in to comment.