-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add the ability to use the docker image with a raspberry pi #846
Conversation
I changed the linux distribution from node, which used Debian, to an arm based linux distribution so the application can be used on an arm based system (e.g. Raspberry)
I'm don't have any experience with docker. The docker support is all contributed by the community. If you give me a small run through what I need to do and need to fill in, I'll look at it. Feel free to send me a mail about it if that's more suited: michael [at] xonaymedia.nl |
I would love to. It's fairly straight forward:
That's it 👍 Now everytime someone commits to the master branch, docker hub will generate a new image automatically. After these 6. Steps you don't need to do anything else in the future. Docker Hub handles everything for you. If you need further assistance, I'm happy to help. Either here or at bastilimbach[at]gmail.com |
@@ -59,7 +59,7 @@ docker run -d \ | |||
--volume ~/magic_mirror/config:/opt/magic_mirror/config \ | |||
--volume ~/magic_mirror/modules:/opt/magic_mirror/modules \ | |||
--name magic_mirror \ | |||
MichMich/MagicMirror | |||
michmich/magicmirror |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MichMich Also if you successfully created the automated build, we need to check, if the naming is still correct. (docker_id/repo_name)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi. I've tried to build a docker image based on this Dockerfile and it fails:
Sending build context to Docker daemon 7.095 MB
Step 1/12 : FROM izone/arm:node
node: Pulling from izone/arm
c5223e92d61a: Pull complete
1360befcec1b: Pull complete
Digest: sha256:2d7ef24f6bdf6c7e462587c2054755f383f8f35ea73bf3aba74f68859b7610b2
Status: Downloaded newer image for izone/arm:node
---> 4a6b73a00ecb
Step 2/12 : ENV NODE_ENV production
---> Running in f729f4b4891d
---> f2f5459d46a2
Removing intermediate container f729f4b4891d
Step 3/12 : ENV MM_PORT 8080
---> Running in 394f3d8d009f
---> 94571211dd56
Removing intermediate container 394f3d8d009f
Step 4/12 : WORKDIR /opt/magic_mirror
---> 54fba0cc5e8c
Removing intermediate container 50ff50c69f23
Step 5/12 : COPY package.json /opt/magic_mirror
---> 87954b5aa71b
Removing intermediate container 64a25a5d5b66
Step 6/12 : RUN npm install
---> Running in 009897841bcf
standard_init_linux.go:178: exec user process caused "exec format error"
The command '/bin/sh -c npm install' returned a non-zero code: 1
My setup is: Windows 7 64bit, docker Server Version: 17.04.0-ce
While current master's Dockerfile ( 25b5daf ) builds fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mh, looks like an error caused by windows because it works on macOS. It could be possible, that dos2unix isn't converting the file correctly. But I never worked with dos2unix before. I just copied this part from PR #743
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@z0diak could you check if the dockerfile from this commit (#825) works? I don't have a windows machine to test this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bastilimbach , yes, it builds successfully. I think dos2unix has nothing to do with it since it fails on RUN npm install command, before first dos2unix call. I've googled this errors message and it shows A LOT issues like this for different containers that uses ARM. Some issues for Mac (moby/moby#23865), some for linux and windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That unfortunate. I think it fails on some mac and windows machines because the arm image doesn't work with the kernel of the "root" os.
We could get around this issue by providing a "recommended server os" section or two dockfile versions. One which uses an arm base image and one which uses normal ubuntu or some sort of x86 os. @MichMich what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also use the docker tag feature. So michmich/magicmirror:latest uses an ubuntu image whereas michmich/magicmirror:arm uses an arm type os.
What does this PR do?
This PR replaces the base image from the Dockerfile and fixes some little thinks (see related issues).
Due to the raspberry pi architecture, the current Docker image doesn't work with any Raspberry PI, because it uses Debian with an x86 architecture. I replaced Debian with an ARM compatible Linux distro, so the image also works on a Raspberry PI.
Related issues
#835 #833
Important
@MichMich You need to connect this repo to your Docker Hub/Store account, so we can actually use this command. This will also fix #835.