svenstaro/miniserve

Error running Docker Container on ARM64

jmcombs opened this issue · 7 comments

I am attempting to run miniserve as a Docker container on Apple Silicone (M1 Pro). Works fine on an x64 Mac but not on Apple Silicone.

When I run, it crashes with www exited with code 139 whether I use Docker Compose or from CLI.

services:
  www:
    container_name: www
    image: svenstaro/miniserve
    #tty: true
    #restart: always
    volumes:
      - /www:/www
    ports:
      - "8080:8080"
    command: "--dirs-first --enable-tar --title www /www"
docker run -v /www:/www -p 8080:8080  -it docker.io/svenstaro/miniserve /www

Hm not sure which Container architecture to use with M1 as I don't have such a device. It should be easy to add though. Could you take a look at the available compiler targets?

@svenstaro, it would be linux/arm64. If you can point me to how you do your builds, I am happy to clone the repo and do a local test build and submit a PR, if that helps.

This is how that's currently built.

@svenstaro I just started working on this. Can you help me understand what you use Makefile for? I'm not familiar with Rust so just trying to go through your entire build process so I can reproduce it and try to find the issue.

The Makefile is just a little helper for some specific configs. You can ignore it and simply use cargo build. :)

I asked someone to run this on M1 and it seemed to work for them. I believe the image is probably fine. Did you get to investigate this further? I'm happy to investigate more if you can provide some more information here. Could you check again?

@svenstaro, no issues now on Apple Silicone. Thanks for checking.