timvisee / send

:mailbox_with_mail: Simple, private file sharing. Mirror of https://gitlab.com/timvisee/send
https://send.vis.ee
Mozilla Public License 2.0
4.35k stars 251 forks source link

Support for ARM architcture #151

Open hexclann opened 1 year ago

hexclann commented 1 year ago

The docker image doesn't support arm architecture at the moment, I get these following error:

Status: Downloaded newer image for registry.gitlab.com/timvisee/send:latest WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested exec /usr/local/bin/docker-entrypoint.sh: exec format error

Please consider adding the support for ARM as it helps to selfhost Send on Raspbery Pis, Oracle Free VMs, AWS Ec2 ARM and much more.

ursuad commented 1 year ago

I got similar errors and had to build my own, I'm running it on a Raspberry Pi. It would be nice if this would be added in your fork.

@timvisee if it helps, these are the commands I used to build the docker image:

buildx create --name mybuilder --driver docker-container --use
buildx build --platform linux/amd64,linux/arm64 -t ursuad/send:v1.0.0 
Clem-Fern commented 1 year ago

Hi,

I encountered the same problem. It's weird cause the arm64 platform is already specified in the gitlab-ci file :

        docker buildx build --platform linux/amd64,linux/arm64 -t $image . --push

However, the published manifest does not seem to contain anything about the arm64 platform...

~$ docker manifest inspect registry.gitlab.com/timvisee/send:latest --verbose
{
        "Ref": "registry.gitlab.com/timvisee/send:latest",
        "Descriptor": {
                "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
                "digest": "sha256:1ee495161f176946e6e4077e17be2b8f8634c2d502172cc530a8cd5affd7078f",
                "size": 3665,
                "platform": {
                        "architecture": "amd64",
                        "os": "linux"
                }
        },
        "Raw": "snip...",
        "SchemaV2Manifest": {
                "schemaVersion": 2,
                "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
                "config": {
                        "mediaType": "application/vnd.docker.container.image.v1+json",
                        "size": 9416,
                        "digest": "sha256:04872f87497008a66536af430cb2be80bd15622a868c894588c04841f6c9659f"
                },
                "layers": [
                      snip snip...
                ]
        }
}

Edited :

After some quick research, it appears that the ARM platform has been added in the CI/CD process with the commit ca52f84 and no release has been published since.

it's coherent to no being able to pull arm image from registry.gitlab.com/timvisee/send:latest. In wait of a new release, you can build your own image as mention by @ursuad or pull continuous build image at registry.gitlab.com/timvisee/send/master:xxxx.

hexclann commented 1 year ago

@timvisee will there be any stable release to support the commit https://github.com/timvisee/send/commit/ca52f84aa567005301e9bf6680d2137c93f43fa1?

victor10100111001 commented 1 year ago

Hi, i created a docker image a while ago that supports arm64. It is however 9 months old so it might have security flaws.

xavion-lux commented 1 year ago

I have built and published docker images for amd64, arm64 and arm/v7 on my fork of the project. There is also a PR open to add arm/v7 support on the official repo but while you wait for a new official release you can get the images from ghcr.io/xavion-lux/send:latest Don't forget to switch back to the official repo once a new release is out.

RayBB commented 4 months ago

@timvisee any chance you have time to review that ARM PR? https://gitlab.com/timvisee/send/-/merge_requests/31

Thinking of hosting my own instance but only have an ARM server right now.

xavion-lux commented 4 months ago

@RayBB the PR has already been reviewed, on halt though since the build action isn't optimal and takes a long time to build.

I have not really had time to look over the building process since but unofficial images supporting ARM and built using github actions from my fork are available at ghcr.io/xavion-lux/send:latest