https://rancher.com/ logo
Title
r

rich-island-96532

11/09/2022, 5:24 PM
Hi guys, I tried to push my local image with epinio. It show that kubelet can not pull image because it can’t find in docker.io registry. Does anyone know what is the cause of this problem ? Is it because I’m using Apple silicon while my image is Amd64 ? (Docker has this same issue i think) I’m using epinio push --container-image-url <my-image> as a push command.
h

high-morning-12231

11/09/2022, 5:50 PM
Yes, you need to build the image for the architecture you are running on. You can use
docker buildx build --platform=linux/amd64 <rest of build command>
to "cross compile"
Out of curiosity, why not just have Epinio do the build for you?
b

broad-dream-81849

11/09/2022, 5:57 PM
I'm not sure also about "local image". Is it published to the docker hub, or any other public registry? Or was it just built locally?
r

rich-island-96532

11/09/2022, 6:02 PM
Thanks for fast reply. Usually I use Epinio for building and deploying. Just want to try if I can use my local image. However, that is the command that I always use to build my image. So, it not working as I said. local image is just built locally, Do I need to run my own registry ? I’m really new to this. English is not my primary language, sorry about that.
b

broad-dream-81849

11/09/2022, 6:09 PM
yes, so probably that's the issue. The image is fetched from an external registry (your local is not visible to the kubelet). So you could either push it to the docker hub, run your own registry (and deploy epinio with this settings), or maybe copy your image to the registry that epinio already deployed internally in your cluster
let us know if you have some issues, I've never tried the two latest scenario, but they're interesting. Maybe the latest one could be the easiest, with some magic kubectl trick
I'll try tomorrow 😄
h

high-morning-12231

11/09/2022, 6:13 PM
There is some weirdness with buildx and usage of the built images 😞 I don't fully understand why this is the case but the easiest option would be to push to docker hub. To make this a little less frustrating, you can use the flag
--push
in the buildx command. Here's an example from my bash history:
docker buildx build --platform=linux/amd64 --push ./ -t atgracey/game-ui-server-onsite:stable
👍 2
*You need to create dockerhub account and login first
r

rich-island-96532

11/09/2022, 6:16 PM
I think the easiest way is just push it to Dockerhub. I’ll try again tomorrow. Thank you both of you !
👍 2
h

high-morning-12231

11/09/2022, 6:19 PM
Of course! Let us know if anything doesn't work. It might be worth adding a note into our docs about this weirdness with buildx