Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE_REQUEST] Support ARMv7 Docker containers #117

Closed
evroon opened this issue Aug 4, 2021 · 4 comments
Closed

[FEATURE_REQUEST] Support ARMv7 Docker containers #117

evroon opened this issue Aug 4, 2021 · 4 comments
Assignees
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change

Comments

@evroon
Copy link
Contributor

evroon commented Aug 4, 2021

When trying to run the docker container on a Raspberry Pi 4 with the default docker-compose.yml, the following is outputted in the logs:

standard_init_linux.go:228: exec user process caused: exec format error

This is most likely because the docker container is not built for ARM architectures.
So I now got Dashy working by building from source (after manually installing nodejs and yarn, because the Raspbian packages ship old versions).

Describe the solution you'd like
It would be nice to provide docker containers for ARM platforms.
I have never tried it, but I see that there is a runs_on option for Github Actions which you can use to run on ARM platforms.

Priority:
Low: Nice to have

@evroon evroon added the 🦄 Feature Request [ISSUE] Suggestion for new feature, update or change label Aug 4, 2021
@evroon evroon changed the title Support ARMv7 Docker containers [FEATURE_REQUEST] Support ARMv7 Docker containers Aug 4, 2021
@Lissy93
Copy link
Owner

Lissy93 commented Aug 4, 2021

Thanks for raising this, you're right that this issue is caused by ARM. I will work on this tomorrow, and get an ARM-compatible image released onto Docker Hub. Will update you on this issue once it's done :)

Lissy93 added a commit that referenced this issue Aug 5, 2021
[FEATURE] RPi Arm V7 & 8 Docker support Re: #117
@Lissy93
Copy link
Owner

Lissy93 commented Aug 7, 2021

So with the below Dockerfile, replacing the base image from alpine:3.14 to arm32v7/alpine:3.14 should work, except DockerHub throws an error (I guess because it's building the container on amd64)

LinuxServer.io seems to support multiple architectures with manifested docker images using buildkit, but got no idea how they're building those images - the Docker docs on enabling BuildKit only covers local containers - I couldn't find a way to do this with DockerHub

I've seen other images using QEMU to emulate the build process on DockerHub, but again, haven't been able to find much info on how to actually do this. I'm thinking that maybe I need a GH action to build the image, and then publish it on DockerHub

@EVOTk or anyone, any ideas on how to approach this? I'm still a bit of a noob at Dockerizing apps, this was the first one I had done.

Dashy's Standard Dockerfile:

# Use stsnadard light-weight Alpine container as base
FROM alpine:3.14

# Install Node and Yarn
RUN apk add --update --no-cache nodejs npm yarn

# Define some Env Vars
ENV PORT 80
ENV DIRECTORY /app
ENV IS_DOCKER true

# Create and set the working directory
WORKDIR ${DIRECTORY}

# Copy over the 'package.json' and 'yarn.lock'
COPY package.json ./
COPY yarn.lock ./

# Install dependencies
RUN yarn

# Copy over all source code
COPY . .

# Build Dashy for production
RUN yarn build

# Expose the port
EXPOSE ${PORT}

# Finally, build the app and start the server
CMD [ "yarn", "build-and-start"]

# Run simple healthchecks every 5 mins, to check that everything's running smoothly
HEALTHCHECK --interval=5m --timeout=2s --start-period=30s CMD yarn health-check

Error caused by using `FROM arm32v7/alpine:3.14` on DockerHub

error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c apk add --update --no-cache nodejs npm yarn]: exit code: 1
Build failed using Buildkit

@evroon
Copy link
Contributor Author

evroon commented Aug 7, 2021

Thank you for all the effort on trying to get this to work. Simply using the arm32v7 version of alpine as you mentioned seems to work on the Rpi 4 (it's a bit slow building the image of course ;) ).

I have experience with Docker but no experience with Docker Hub. There is an explanation here with a template Dockerfile on how to use QEMU to build ARM images on Docker Hub like you mentioned.

I will try myself to get it to work. If that works, I will create a PR.

@Lissy93
Copy link
Owner

Lissy93 commented Aug 7, 2021

Thanks again @evroon for providing the ARM-based Docker image
I'm super happy that it's finally working, and I hope it runs okay on your Pi :)

docker pull lissy93/dashy:arm64v8

@Lissy93 Lissy93 closed this as completed Aug 7, 2021
asterling8516 pushed a commit to asterling8516/dashy that referenced this issue Nov 23, 2023
Closes Lissy93#117

Signed-off-by: Bjorn Lammers <walkxnl@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change
Projects
None yet
Development

No branches or pull requests

2 participants