Support arm64 architecture (#497)

* master

* Regenerate dockerfiles to update case statements

* Update architectures
This commit is contained in:
longquan7 2017-08-14 20:15:40 +08:00 committed by Simen Bekkhus
parent dbab8eb181
commit 35dbf01b34
13 changed files with 15 additions and 1 deletions

View File

@ -28,6 +28,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \

View File

@ -28,6 +28,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \

View File

@ -28,6 +28,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \

View File

@ -28,6 +28,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \

View File

@ -28,6 +28,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \

View File

@ -28,6 +28,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \

View File

@ -28,6 +28,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \

View File

@ -28,6 +28,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \

View File

@ -28,6 +28,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \

View File

@ -28,6 +28,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
amd64) ARCH='x64';; \
ppc64el) ARCH='ppc64le';; \
s390x) ARCH='s390x';; \
arm64) ARCH='arm64';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \

View File

@ -2,3 +2,4 @@ bashbrew-arch variants
amd64 default,alpine,onbuild,slim,stretch,wheezy
ppc64le default,onbuild,slim,stretch
s390x default,onbuild,slim,stretch
arm64v8 default,onbuild,slim,stretch

View File

@ -19,6 +19,9 @@ function get_arch() {
s390x)
arch="s390x"
;;
aarch64)
arch="arm64"
;;
*)
echo "$0 does not support architecture $arch ... aborting"
exit 1

View File

@ -42,7 +42,7 @@ function update_node_version {
sed -E -i.bak 's/^FROM (.*)/FROM '"$fromprefix"'\1/' "$dockerfile" && rm "$dockerfile".bak
sed -E -i.bak 's/^(ENV NODE_VERSION |FROM .*node:).*/\1'"$version.$fullVersion"'/' "$dockerfile" && rm "$dockerfile".bak
sed -E -i.bak 's/^(ENV YARN_VERSION ).*/\1'"$yarnVersion"'/' "$dockerfile" && rm "$dockerfile".bak
if [[ "${version/.*/}" -ge 8 || "$arch" = "ppc64le" || "$arch" = "s390x" ]]; then
if [[ "${version/.*/}" -ge 8 || "$arch" = "ppc64le" || "$arch" = "s390x" || "$arch" = "arm64" ]]; then
sed -E -i.bak 's/FROM (.*)alpine:3.4/FROM \1alpine:3.6/' "$dockerfile"
rm "$dockerfile.bak"
fi