# Multiarch docker images with buildkit and cache upload fail

**URL:** <https://forum.gitea.com/t/multiarch-docker-images-with-buildkit-and-cache-upload-fail/6213>\
**Category:** Install/Maintain/Configure\
**Created:** [November 9, 2022, 12:05am UTC](https://forum.gitea.com/t/multiarch-docker-images-with-buildkit-and-cache-upload-fail/6213 "2022-11-09T00:05:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GrosDede](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/grosdede/32/3203_2.png) [@GrosDede](https://forum.gitea.com/u/GrosDede)\
**Post date:** [November 9, 2022, 12:05am UTC](https://forum.gitea.com/t/multiarch-docker-images-with-buildkit-and-cache-upload-fail/6213/1 "2022-11-09T00:05:31Z")

</div>

Hello,

I have a kubernetes cluster (k3s, with amd64 and arm64 machines), and I have deployed a gitea instance (chart=gitea-0.0.3 version=1.17.3, with postgresql and memcached). I want to build multi-arch docker images, so I have installed drone (2.15.0) with the drone-runner-kubernetes (1.0.0-rc.3).

When I try to build multi-arch image with `docker buildx --cache-to=...`, I have a error for cache upload (buildx log):

```auto
{\"errors\":[{\"code\":\"MANIFEST_INVALID\",\"message\":\"\"}]}\n

```

In gitea logs, I have :

```auto
2022/11/09 10:57:05 [636aecd1-2] router: completed PUT /v2/<org>/<project>/manifests/<tag> for 10.42.1.143:51544, 400 Bad Request in 48.4ms @ container/container.go:440(container.UploadManifest)

```

How can I give more info to help fix this problem ?

---

<div class="post-metadata">

**Author:** ![GrosDede](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/grosdede/32/3203_2.png) [@GrosDede](https://forum.gitea.com/u/GrosDede)\
**Post date:** [November 9, 2022, 12:36am UTC](https://forum.gitea.com/t/multiarch-docker-images-with-buildkit-and-cache-upload-fail/6213/2 "2022-11-09T00:36:53Z")

</div>

I have looked inside gitea source code, it seams that the mediatype used by buildkit cache is not recognized by gitea (/routers/api/packages/container/manifest.go func processManifest, returns errManifestInvalid), but request mime type looks good  
There is an other use case of errManifestInvalid, in func processImageManifestIndex.

---

<div class="post-metadata">

**Author:** ![mhkarimi1383](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/mhkarimi1383/32/4253_2.png) [@mhkarimi1383](https://forum.gitea.com/u/mhkarimi1383)\
**Post date:** [December 11, 2023, 6:59pm UTC](https://forum.gitea.com/t/multiarch-docker-images-with-buildkit-and-cache-upload-fail/6213/3 "2023-12-11T18:59:47Z")

</div>

Hi, I’m experiencing the same problem with

version 1.21.1 built with GNU Make 4.4.1, go1.21.4 : bindata, timetzdata, sqlite, sqlite\_unlock\_notify
