https://metaplay.io logo
Issues deploying project with cli
# questions-and-feedback
d
Hi, I just initialized my project and trying to deploy i get an error from the cli: ➜ metaplay deploy server * misfitz:test Metaplay CLI 1.3.1, interactive mode ERROR: failed to get docker image config file: Error response from daemon: NotFound: snapshot sha256:d1aa8395d22ab35ec777ae37b40fcd0c5f0f527865bd6eacac0c656b878f15d5 does not exist: not found if i do a docker images i don't see any image with that hash: ➜ docker images | grep misfitz misfitz test e6b760c1ba3d 17 minutes ago 118MB The build step went find without errors. Any ideas what the problem could be? Thanks Andre
I've tried adding some debug to the cli and it seems to be reading the correct image. According to AI help it suggest docker is having problem accessing a cache image layer. I've tried "docker system prune -a" and rebuilt the server and no difference.
j
What if you just do
metaplay deploy server
, it'll enter an interactive mode where you can select the environment and image.
d
➜ metaplay deploy server Metaplay CLI 1.3.1, interactive mode Select Target Environment ✓ Develop [---] ERROR: no docker images matching project '***-*-***' found locally; build an image first with 'metaplay build image'
When i do the build it seems to be building for the correct projet. at the end it says: View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/hwhpxmdhmdcrkemu6tykxfqbz ✅ Successfully built docker image --***:1748332508 You can deploy the image to a cloud environment using: metaplay deploy server ENVIRONMENT --***:1748332508 Available environments: neat-paws-glow-quickly, neat-paws-glow-nimbly
j
I'll poke someone who worked on this
d
I'm trying on a clean linux on aws. maybe it's related to my desktop 🤷
j
Our CI runs the CLI on linux, so it should theoretically work. However afaik, we don't have anyone running linux as a day to day driver so it might also be a bug
d
my previous message was a bit ambiguous. I was having the above issue on my osx latpop. I have tried on an aws ubuntu server and managed to make it work on an amd64 arch. I had issues on an arm arch and I wonder wether the osx issue could be related. Have you had the deployment working on osx?
j
Yep a bunch of us use a macbook, so it should be fine
p
These operations that are failing are connecting to your locally running Docker daemon, so this would most likely be explained by there being something fishy with the Docker configuration. Unfortunately, this is going not going to be a trivial issue to debug. Are you running Docker Desktop on your Mac? Which version are you using? Also, just to make sure, you did produce the misfitz:test Docker image with 'metaplay build image' for the same project (i.e., you ran the command in the same project directory)? We bake the project information into the images so that we don't accidentally deploy servers of the wrong project. We do regularly run the CLI on Linux machines in our CI pipelines, though, so if you are able to use a Linux machine in the mean time, that should be a good workaround for the time being.
Could you actually copy-paste the contents of your
metaplay-project.yaml
, especially the
projectID
? It looks like the built docker image name is not well-formed.
d
hi, thanks for the reply. Yeah i suspect it's related to my docker install but i have uninstalled and reinstalled a fresh version of docker and updated to the latest.
The projectID is fine. There is an error pasted where i did a deploy with no image name that failed because i had build with an image name previously and so it didn't find it. The problem i have is this error: ERROR: failed to get docker image config file: Error response from daemon: NotFound: snapshot sha256:b0df80b43aa42a69abd5d4524114b1d8171f67aa994cb141878a6a433714841e does not exist: not found The strange things is that I don't see any snapshot with that sha when i do a docker image inspect. I also added some debug to the metaplay cli and recompiled and I can see it's opening the right image before trying to read the config file. Anyway I appreciate it's probably a local error with my docker install so feel free to close this. If i find what i was i'll update here.
p
There's now a new version (v1.3.3) published that has a speculative fix for this issue (at least it fixes some seemingly similar issues on macOS for my colleagues). Feel free to give that a try at some point to see if it fixes the issue you're seeing as well.