getting an exec error when running for first time
hunleyd opened this issue · 4 comments
hunleyd commented
When I run:
docker run --rm -it -v /usr/share/assistant-relay/secrets:/assistant-relay/server/configurations/secrets -v /usr/share/assistant-relay/tokens:/assistant-relay/server/configurations/tokens kmlucy/docker-assistant-relay
to get the OAuth URL, it's failing with:
standard_init_linux.go:207: exec user process caused "exec format error"
This in on a Pi 3B+ running:
cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
kmlucy commented
I believe this is due to the architecture. This image was built for x86, not ARM. The Node image it is based on should pull the correct architecture on whatever device it is pulled to, so you can try just cloning this repository and building. I'm not sure if anything else will need to be changed.
hunleyd commented
sadly, using your dockerfile fails:
root@pi2:/usr/share/assistant-relay # docker build . -t assistant-relay -f ./dockerfile
Sending build context to Docker daemon 4.096kB
Step 1/8 : FROM node:8-alpine
---> 51a8d44aea94
Step 2/8 : LABEL maintainer "Kyle Lucy <kmlucy@gmail.com>"
---> Using cache
---> ff51a36896d8
Step 3/8 : RUN apk add --no-cache git tzdata && git clone https://github.com/greghesp/assistant-relay.git && cd assistant-relay && npm install && apk del git
---> Running in 32569d0a59ba
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/armhf/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/armhf/APKINDEX.tar.gz
(1/8) Installing ca-certificates (20190108-r0)
(2/8) Installing nghttp2-libs (1.35.1-r0)
(3/8) Installing libssh2 (1.8.2-r0)
(4/8) Installing libcurl (7.64.0-r1)
(5/8) Installing expat (2.2.6-r0)
(6/8) Installing pcre2 (10.32-r1)
(7/8) Installing git (2.20.1-r0)
(8/8) Installing tzdata (2019a-r0)
Executing busybox-1.29.3-r10.trigger
Executing ca-certificates-20190108-r0.trigger
OK: 23 MiB in 24 packages
Cloning into 'assistant-relay'...
> grpc@1.8.0 install /assistant-relay/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.8.0/node-v57-linux-arm-musl.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.8.0 and node@8.16.0 (node-v57 ABI, musl) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:16)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Linux 4.14.98-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl/grpc_node.node" "--module_name=grpc_node" "--module_path=/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl"
gyp ERR! cwd /assistant-relay/node_modules/grpc
gyp ERR! node -v v8.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl/grpc_node.node --module_name=grpc_node --module_path=/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/assistant-relay/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:915:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
node-pre-gyp ERR! System Linux 4.14.98-v7+
node-pre-gyp ERR! command "/usr/local/bin/node" "/assistant-relay/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /assistant-relay/node_modules/grpc
node-pre-gyp ERR! node -v v8.16.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl/grpc_node.node --module_name=grpc_node --module_path=/assistant-relay/node_modules/grpc/src/node/extension_binary/node-v57-linux-arm-musl' (1)
npm WARN assistant-relay@2.1.1 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.8.0 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.8.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-04-25T16_14_33_695Z-debug.log
The command '/bin/sh -c apk add --no-cache git tzdata && git clone https://github.com/greghesp/assistant-relay.git && cd assistant-relay && npm install && apk del git' returned a non-zero code: 1
:(
kmlucy commented
I would recommend forking this repository and working from there. You may need to use a different version of Node, possibly not based on Alpine. Unfortunately, I don't have Pi to develop an ARM version of this image on.
hunleyd commented
OK., thanks.