Open noamlivni opened 6 months ago
Hi, you need to build the image for ARM to work on that architecture :)
@vitobotta i download the image as arm64
docker pull --platform linux/arm64 vitobotta/velero-backup-notification:v1.0.0
here is the inspect of the image
`[
"Parent": "",
"Comment": "buildkit.dockerfile.v0",
"Created": "2023-05-02T11:30:11.142075184Z",
"Container": "",
"ContainerConfig": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": null,
"Cmd": null,
"Image": "",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": null
},
"DockerVersion": "",
"Author": "",
"Config": {
"Hostname": "",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"/velero-notifications"
],
"ArgsEscaped": true,
"Image": "",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": null
},
"Architecture": "arm64",
"Os": "linux",
"Size": 44734073,
"VirtualSize": 44734073,
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/bcabe00f4cfb41febcd98fae899cd8977ef2d9ee67d1e5f6904112cb55b4f786/diff",
"MergedDir": "/var/lib/docker/overlay2/6488ee570084b5877dab855f6c61eb572f1a94dbe4a495e09ba6a3de604b3717/merged",
"UpperDir": "/var/lib/docker/overlay2/6488ee570084b5877dab855f6c61eb572f1a94dbe4a495e09ba6a3de604b3717/diff",
"WorkDir": "/var/lib/docker/overlay2/6488ee570084b5877dab855f6c61eb572f1a94dbe4a495e09ba6a3de604b3717/work"
},
"Name": "overlay2"
},
"RootFS": {
"Type": "layers",
"Layers": [
"sha256:26cbea5cba74143fbe6f584f5fc5321543155aedc4a434fcaa63b643877b5a74",
"sha256:c7086c3b6feae8516c178070b150b3c6667f250052e1b6d0fd5616a9f0e840ed"
]
},
"Metadata": {
"LastTagTime": "2023-12-25T06:07:42.805128792Z"
}
}
]`
Ah sorry by bad, the problem is the binary itself. It would need to be compiled for ARM to work on that architecture, so it's not just the image.
@vitobotta thanks! can you help me to understand how to compile it?
You need an ARM Linux machine with Crystal installed, better if with Alpine Linux so you can compile a static binary, then run:
shards install --without-development
crystal build src/hetzner-k3s.cr --release --static
Then build the Docker image with the binary that it creates and the Dockerfile in this repo.
Hey @vitobotta , im having issue with velero-notifications. im using velero-backup-notifiaction , until now i worked with
amd64
arch nodes and it worked amazingi changed the arch of my nodes to
graviton
(arm64
) and it stopped working , i get this error:exec /velero-notifications: exec format error