Closed Legion2 closed 4 years ago
I second that, I do issues running the latest image on m Raspberry Pi in combination with Balena Cloud. Somehow the latest image is not compatible anymore. I am assuming there is an issue with the architecture.
This is the error:
standard_init_linux.go:207: exec user process caused "exec format error"
@idoodler this error may because of bad line-ending in the docker entrypoint or the entrypoint does not have the executable permission set. How do you run this docker image?
@Legion2 The docker image is run on a Raspberry Pi 3 via the balena cloud infrastructure.
Dockerfile:
FROM bastilimbach/docker-magicmirror:latest
RUN apt-get update
COPY ./config /opt/magic_mirror/config
COPY ./modules /opt/magic_mirror/modules
COPY ./moduleInstall.sh /opt
RUN chmod +x /opt/moduleInstall.sh
RUN /opt/moduleInstall.sh
I use LF
in my project.
all .sh
scripts must have linux line endings (LF) when they are copied into the docker image.
Sorry, I missinterpreted my IDE. I use LF
do you get the error when you build or run the image?
When I run the image
did you try to use an older version if this image to test that it still works?
When I use the older raspberry tag I get the following error when building the image:
manifest for bastilimbach/docker-magicmirror:raspberry not found
If you know the id hash of the image you can use it to get the older version
I don't known the hash of the older version:/ And as far as I know its not possible to get the hash if a newer version has been published.
you can get the version from the travis build logs
I found the hash, but it looks like this only works if the image doesn't use tags.
bastilimbach/docker-magicmirror@sha256:125f81ff1a348b8295f381c64b7c50cc709cc5cb63812019962245db5597727b
The hash can be found here
@idoodler which image is throwing the execption, your own image build upon mm or the original mm image? What happens if you run the original mm image on your pi without the balena environment by directly executing the docker run command provided in the README?
@Legion2 back to the original post. You may can take a look at my setup. Is this what you expect here too?
@khassel yes how did you define the tags?
I'm using docker buildx build
(same as in this repo) and execute this for every tag, you can see the build script here. The second run is very quick because everything is cached.
@idoodler can you post the output of docker inspect bastilimbach/docker-magicmirror:latest
@khassel Here is the output. As I am running it on a Balena device (Raspberry Pi 4 running Balena OS I executed balena inspect {CONTAINER_ID}
to obtain the output
```JSON [ { "Id": "8bdbec29ef4831515b8cb06802dfaf1bfa6d6200d16d4251c1ce936544172b42", "Created": "2020-03-08T19:11:25.566487951Z", "Path": "./docker-entrypoint.sh", "Args": [ "node", "serveronly" ], "State": { "Status": "restarting", "Running": true, "Paused": false, "Restarting": true, "OOMKilled": false, "Dead": false, "Pid": 0, "ExitCode": 1, "Error": "", "StartedAt": "2020-03-14T09:21:10.888992379Z", "FinishedAt": "2020-03-14T09:21:12.238797753Z" }, "Image": "sha256:4489da3e8431873a1e1696f872e94925354b9cc9646e43f6198a962e24f103a9", "ResolvConfPath": "/var/lib/docker/containers/8bdbec29ef4831515b8cb06802dfaf1bfa6d6200d16d4251c1ce936544172b42/resolv.conf", "HostnamePath": "/var/lib/docker/containers/8bdbec29ef4831515b8cb06802dfaf1bfa6d6200d16d4251c1ce936544172b42/hostname", "HostsPath": "/var/lib/docker/containers/8bdbec29ef4831515b8cb06802dfaf1bfa6d6200d16d4251c1ce936544172b42/hosts", "LogPath": "", "Name": "/MagicMirror_2047302_1292631", "RestartCount": 3611, "Driver": "aufs", "Platform": "linux", "MountLabel": "", "ProcessLabel": "", "AppArmorProfile": "", "ExecIDs": null, "HostConfig": { "Binds": [ "/tmp/balena-supervisor/services/XXXXXXXXXXX/MagicMirror:/tmp/resin", "/tmp/balena-supervisor/services/XXXXXXXXXXX/MagicMirror:/tmp/balena" ], "ContainerIDFile": "", "ContainerIDEnv": "", "LogConfig": { "Type": "journald", "Config": {} }, "NetworkMode": "host", "PortBindings": {}, "RestartPolicy": { "Name": "always", "MaximumRetryCount": 0 }, "AutoRemove": false, "VolumeDriver": "", "VolumesFrom": null, "CapAdd": [], "CapDrop": [], "Dns": [], "DnsOptions": [], "DnsSearch": [], "ExtraHosts": [], "GroupAdd": [], "IpcMode": "shareable", "Cgroup": "", "Links": null, "OomScoreAdj": 0, "PidMode": "", "Privileged": true, "PublishAllPorts": false, "ReadonlyRootfs": false, "SecurityOpt": [], "UTSMode": "", "UsernsMode": "", "ShmSize": 67108864, "Runtime": "runc", "ConsoleSize": [ 0, 0 ], "Isolation": "", "CpuShares": 0, "Memory": 0, "NanoCpus": 0, "CgroupParent": "", "BlkioWeight": 0, "BlkioWeightDevice": null, "BlkioDeviceReadBps": null, "BlkioDeviceWriteBps": null, "BlkioDeviceReadIOps": null, "BlkioDeviceWriteIOps": null, "CpuPeriod": 0, "CpuQuota": 0, "CpuRealtimePeriod": 0, "CpuRealtimeRuntime": 0, "CpusetCpus": "", "CpusetMems": "", "Devices": [], "DeviceCgroupRules": null, "DiskQuota": 0, "KernelMemory": 0, "MemoryReservation": 0, "MemorySwap": 0, "MemorySwappiness": null, "OomKillDisable": false, "PidsLimit": 0, "Ulimits": [], "CpuCount": 0, "CpuPercent": 0, "IOMaximumIOps": 0, "IOMaximumBandwidth": 0, "MaskedPaths": null, "ReadonlyPaths": null }, "GraphDriver": { "Data": null, "Name": "aufs" }, "Mounts": [ { "Type": "bind", "Source": "/tmp/balena-supervisor/services/1412449/MagicMirror", "Destination": "/tmp/balena", "Mode": "", "RW": true, "Propagation": "rprivate" }, { "Type": "bind", "Source": "/tmp/balena-supervisor/services/1412449/MagicMirror", "Destination": "/tmp/resin", "Mode": "", "RW": true, "Propagation": "rprivate" } ], "Config": { "Hostname": "bf9dc76", "Domainname": "", "User": "", "AttachStdin": false, "AttachStdout": false, "AttachStderr": false, "ExposedPorts": { "8080/tcp": {} }, "Tty": true, "OpenStdin": false, "StdinOnce": false, "Env": [ "RESIN_DEVICE_NAME_AT_INIT=David's Home", "BALENA_DEVICE_NAME_AT_INIT=David's Home", "TIMEZONE=Europe/Berlin", "TZ=Europe/Berlin", "LX_HOST=XXXXXXXXXXX", "LX_OBSERVING_UUIDS=[\"1446ce13-00ad-7938-ffffcfd01b83e69f\", \"1446ce13-00ad-793f-ffffcfd01b83e69f\", \"1446ce13-00ad-7946-ffffcfd01b83e69f\"]", "LX_PRESENCE=14477f27-0028-5b5a-ffff60b79c5f2c34", "LX_PWD=XXXXXXXXXXX", "LX_ROOM_UUID=116fbfb4-01df-1432-ffff60b79c5f2c34", "LX_USER=XXXXXXXXXXX", "BALENA_APP_ID=XXXXXXXXXXX", "BALENA_APP_NAME=XXXXXXXXXXX", "BALENA_SERVICE_NAME=MagicMirror", "BALENA_DEVICE_UUID=XXXXXXXXXXX", "BALENA_DEVICE_TYPE=raspberrypi3", "BALENA_HOST_OS_VERSION=balenaOS 2.47.0+rev1", "BALENA_SUPERVISOR_VERSION=10.6.27", "BALENA_APP_LOCK_PATH=/tmp/balena/updates.lock", "BALENA=1", "RESIN_APP_ID=XXXXXXXXXXX", "RESIN_APP_NAME=Zuhause-MagicMirror", "RESIN_SERVICE_NAME=MagicMirror", "RESIN_DEVICE_UUID=XXXXXXXXXXX", "RESIN_DEVICE_TYPE=raspberrypi3", "RESIN_HOST_OS_VERSION=balenaOS 2.47.0+rev1", "RESIN_SUPERVISOR_VERSION=10.6.27", "RESIN_APP_LOCK_PATH=/tmp/balena/updates.lock", "RESIN=1", "RESIN_SERVICE_KILL_ME_PATH=/tmp/balena/handover-complete", "BALENA_SERVICE_HANDOVER_COMPLETE_PATH=/tmp/balena/handover-complete", "USER=root", "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "NODE_VERSION=12.16.1", "YARN_VERSION=1.22.0", "NODE_ENV=production" ], "Cmd": [ "node", "serveronly" ], "Healthcheck": { "Test": [ "NONE" ] }, "Image": "sha256:4489da3e8431873a1e1696f872e94925354b9cc9646e43f6198a962e24f103a9", "Volumes": null, "WorkingDir": "/opt/magic_mirror", "Entrypoint": [ "./docker-entrypoint.sh" ], "OnBuild": null, "Labels": { "io.balena.app-id": "XXXXXXXXXXX", "io.balena.service-id": "XXXXXXXXXXX", "io.balena.service-name": "MagicMirror", "io.balena.supervised": "true" }, "StopSignal": "SIGTERM", "StopTimeout": 10 }, "NetworkSettings": { "Bridge": "", "SandboxID": "XXXXXXXXXXX", "HairpinMode": false, "LinkLocalIPv6Address": "", "LinkLocalIPv6PrefixLen": 0, "Ports": {}, "SandboxKey": "/var/run/balena-engine/netns/default", "SecondaryIPAddresses": null, "SecondaryIPv6Addresses": null, "EndpointID": "", "Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "MacAddress": "", "Networks": { "host": { "IPAMConfig": null, "Links": null, "Aliases": null, "NetworkID": "ab02a380eb732d6ab15aef658a867bcdf4eeaf88741852cf0e422673f7bdf47d", "EndpointID": "", "Gateway": "", "IPAddress": "", "IPPrefixLen": 0, "IPv6Gateway": "", "GlobalIPv6Address": "", "GlobalIPv6PrefixLen": 0, "MacAddress": "", "DriverOpts": null } } } } ] ```
I am just trying to pull the image directly on the targeted device
When pulling the image on the targeted device the image runs fine. I guess there is a discrepancy between the image being build on the device and on the Balena build system. I'll forward this issue to Balena.
I just fixed the issue by modifying the Dockerfile
's first line:
FROM --platform=linux/arm bastilimbach/docker-magicmirror:latest
I guess its an issue with Balenas backend.
A new version of MagicMirror was released with potentially breaking changes. Please add version tags to this image, so we can decide which version we use.
I will take a look at this after work today. We really need to have the version tags! It shouldn't take too long. For a quick workaround you can fork this repo and adapt the following line to checkout the previous version: https://github.com/bastilimbach/docker-MagicMirror/blob/fdaec060203adb49dc14ae6b7949b7ee3eaddf1f/Dockerfile#L6
I created PR #37 to address this issue. @Legion2 could you take a look at the PR description and quickly comment if this is sufficient and resolves this issue?
@Legion2 It works 👍 We now have tags: https://hub.docker.com/r/bastilimbach/docker-magicmirror/tags
Can you please tag major versions of the image, so we can better control when we pull a new version of the image with breaking changes.