Ich versuche, meine docker-Datei ohne Erfolg einzurichten.alpine linux kompilierte nodejs nicht ausführen
Dies ist, was ich versuche zu tun: Ich als Antwort erhalten
FROM alpine:3.5
ENV VERSION=4.8.1
RUN apk add --no-cache curl make gcc g++ python linux-headers binutils-gold gnupg libstdc++ tar xz && \
curl -sSL -o node.tar.xz https://nodejs.org/download/release/v${VERSION}/node-v${VERSION}-linux-x64.tar.xz && \
tar xJf node.tar.xz -C /usr/local --strip-components 1
CMD ["node", "--version"]
was ist das:
Step 1 : FROM alpine:3.5
---> 4a415e366388
Step 2 : ENV VERSION 4.8.1
---> Using cache
---> 69c1a9ea15a9
Step 3 : RUN apk add --no-cache curl make gcc g++ python linux-headers binutils-gold gnupg libstdc++ tar xz && curl -sSL -o node.tar.xz https://nodejs.org/download/release/v${VERSION}/node-v${VERSION}-linux-x64.tar.xz && tar xJf node.tar.xz -C /usr/local --strip-components 1
---> Using cache
---> 7f508d49e0bc
Step 4 : CMD node --version
---> Running in 196a2ed982fd
---> c0e1fbc1fe23
Removing intermediate container 196a2ed982fd
Successfully built c0e1fbc1fe23
+ docker -H tcp://tjsu250n:2375 run --restart=always --name=barcode -d -p 9002:9001 tjdft_gesirh/barcode:194
c8483a53359d8a26b2f7e3e3bd01b3185a235f7722687f3aadf9c4ff6d4ac540
+ docker -H tcp://tjsu250n:2375 images -a
+ grep tjdft_gesirh/barcode
+ expr 194 - 1
+ awk {print $1}
+ grep 193
+ [ != ]
/tmp/hudson6046350871523920710.sh: 14: [: !=: unexpected operator
Finished: SUCCESS
Aber trotz dieser Nachricht, XPTO der Befehl Protokolle Docker kehrt :
standard_init_linux.go:175: exec user process caused "no such file or directory"
wenn ich RU verwende N Befehl dies auszuführen:
RUN ls -la /usr/local/bin/ && \
echo $PATH && \
npm --version
ich dies als Antwort erhalten:
Step 4 : RUN ls -la /usr/local/bin/ && echo $PATH && npm --version && ./usr/local/bin/node --version
---> Running in 1b6bd429d169
total 24244
drwxrwxr-x 2 500 500 27 Mar 21 19:14 .
drwxr-xr-x 6 root root 101 Mar 23 21:02 ..
-rwxrwxr-x 1 500 500 24825844 Mar 21 19:14 node
lrwxrwxrwx 1 500 500 38 Mar 21 19:14 npm -> ../lib/node_modules/npm/bin/npm-cli.js
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[91m/usr/local/bin/npm: exec: line 2: /usr/local/bin/node: not found
[0mtime="2017-03-23T18:12:59-03:00" level=info msg="The command '/bin/sh -c ls -la /usr/local/bin/ && \techo $PATH && \tnpm --version && \t./usr/local/bin/node --version' returned a non-zero code: 127"
Build step 'Execute shell' marked build as failure
Finished: FAILURE
ich etwas Hilfe benötigen.
## bearbeiten ##
Der Fehler /usr/local/bin/node: not found
mit Oracle Java aufgetreten zu. Ich weiß nicht, warum es nicht von alpine ausführbar ist.
Sie haben eine nodejs 4.8.1 alpine dockerfile [https://github.com/nodejs/docker-node/blob/14681db8e89c0493e8af20657883fa21488a7766/4.8/alpine/Dockerfile] verfügbar unter 'node: 4.8.1-alpine ' –
Ich muss nodejs in einem alpine-oraclejdk8 dockerfile Bild installieren. :( –
erstellt die Dockerfile lokal, ohne jenkins? – lang2