Support arm32v7 architecture (#504)
* Support arm32v7 * Fix update script for armv7 * Fix get_arch function for arm32v7 * Fix indent
This commit is contained in:
parent
f71321cf71
commit
b502aa0163
|
@ -29,6 +29,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
|
||||||
ppc64el) ARCH='ppc64le';; \
|
ppc64el) ARCH='ppc64le';; \
|
||||||
s390x) ARCH='s390x';; \
|
s390x) ARCH='s390x';; \
|
||||||
arm64) ARCH='arm64';; \
|
arm64) ARCH='arm64';; \
|
||||||
|
armhf) ARCH='armv7l';; \
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
||||||
|
|
|
@ -2,3 +2,4 @@ bashbrew-arch variants
|
||||||
amd64 default,alpine,onbuild,slim,stretch,wheezy
|
amd64 default,alpine,onbuild,slim,stretch,wheezy
|
||||||
ppc64le default,onbuild,slim,stretch
|
ppc64le default,onbuild,slim,stretch
|
||||||
arm64v8 default,onbuild,slim,stretch
|
arm64v8 default,onbuild,slim,stretch
|
||||||
|
arm32v7 default,onbuild,slim,stretch
|
||||||
|
|
|
@ -30,6 +30,7 @@ RUN buildDeps='xz-utils' \
|
||||||
ppc64el) ARCH='ppc64le';; \
|
ppc64el) ARCH='ppc64le';; \
|
||||||
s390x) ARCH='s390x';; \
|
s390x) ARCH='s390x';; \
|
||||||
arm64) ARCH='arm64';; \
|
arm64) ARCH='arm64';; \
|
||||||
|
armhf) ARCH='armv7l';; \
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& set -x \
|
&& set -x \
|
||||||
|
|
|
@ -29,6 +29,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
|
||||||
ppc64el) ARCH='ppc64le';; \
|
ppc64el) ARCH='ppc64le';; \
|
||||||
s390x) ARCH='s390x';; \
|
s390x) ARCH='s390x';; \
|
||||||
arm64) ARCH='arm64';; \
|
arm64) ARCH='arm64';; \
|
||||||
|
armhf) ARCH='armv7l';; \
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
||||||
|
|
|
@ -29,6 +29,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
|
||||||
ppc64el) ARCH='ppc64le';; \
|
ppc64el) ARCH='ppc64le';; \
|
||||||
s390x) ARCH='s390x';; \
|
s390x) ARCH='s390x';; \
|
||||||
arm64) ARCH='arm64';; \
|
arm64) ARCH='arm64';; \
|
||||||
|
armhf) ARCH='armv7l';; \
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
||||||
|
|
|
@ -30,6 +30,7 @@ RUN buildDeps='xz-utils' \
|
||||||
ppc64el) ARCH='ppc64le';; \
|
ppc64el) ARCH='ppc64le';; \
|
||||||
s390x) ARCH='s390x';; \
|
s390x) ARCH='s390x';; \
|
||||||
arm64) ARCH='arm64';; \
|
arm64) ARCH='arm64';; \
|
||||||
|
armhf) ARCH='armv7l';; \
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& set -x \
|
&& set -x \
|
||||||
|
|
|
@ -29,6 +29,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
|
||||||
ppc64el) ARCH='ppc64le';; \
|
ppc64el) ARCH='ppc64le';; \
|
||||||
s390x) ARCH='s390x';; \
|
s390x) ARCH='s390x';; \
|
||||||
arm64) ARCH='arm64';; \
|
arm64) ARCH='arm64';; \
|
||||||
|
armhf) ARCH='armv7l';; \
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
||||||
|
|
|
@ -29,6 +29,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
|
||||||
ppc64el) ARCH='ppc64le';; \
|
ppc64el) ARCH='ppc64le';; \
|
||||||
s390x) ARCH='s390x';; \
|
s390x) ARCH='s390x';; \
|
||||||
arm64) ARCH='arm64';; \
|
arm64) ARCH='arm64';; \
|
||||||
|
armhf) ARCH='armv7l';; \
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
||||||
|
|
|
@ -30,6 +30,7 @@ RUN buildDeps='xz-utils' \
|
||||||
ppc64el) ARCH='ppc64le';; \
|
ppc64el) ARCH='ppc64le';; \
|
||||||
s390x) ARCH='s390x';; \
|
s390x) ARCH='s390x';; \
|
||||||
arm64) ARCH='arm64';; \
|
arm64) ARCH='arm64';; \
|
||||||
|
armhf) ARCH='armv7l';; \
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& set -x \
|
&& set -x \
|
||||||
|
|
|
@ -29,6 +29,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
|
||||||
ppc64el) ARCH='ppc64le';; \
|
ppc64el) ARCH='ppc64le';; \
|
||||||
s390x) ARCH='s390x';; \
|
s390x) ARCH='s390x';; \
|
||||||
arm64) ARCH='arm64';; \
|
arm64) ARCH='arm64';; \
|
||||||
|
armhf) ARCH='armv7l';; \
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
||||||
|
|
|
@ -29,6 +29,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
|
||||||
ppc64el) ARCH='ppc64le';; \
|
ppc64el) ARCH='ppc64le';; \
|
||||||
s390x) ARCH='s390x';; \
|
s390x) ARCH='s390x';; \
|
||||||
arm64) ARCH='arm64';; \
|
arm64) ARCH='arm64';; \
|
||||||
|
armhf) ARCH='armv7l';; \
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
||||||
|
|
|
@ -30,6 +30,7 @@ RUN buildDeps='xz-utils' \
|
||||||
ppc64el) ARCH='ppc64le';; \
|
ppc64el) ARCH='ppc64le';; \
|
||||||
s390x) ARCH='s390x';; \
|
s390x) ARCH='s390x';; \
|
||||||
arm64) ARCH='arm64';; \
|
arm64) ARCH='arm64';; \
|
||||||
|
armhf) ARCH='armv7l';; \
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& set -x \
|
&& set -x \
|
||||||
|
|
|
@ -29,6 +29,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
|
||||||
ppc64el) ARCH='ppc64le';; \
|
ppc64el) ARCH='ppc64le';; \
|
||||||
s390x) ARCH='s390x';; \
|
s390x) ARCH='s390x';; \
|
||||||
arm64) ARCH='arm64';; \
|
arm64) ARCH='arm64';; \
|
||||||
|
armhf) ARCH='armv7l';; \
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
||||||
|
|
|
@ -30,6 +30,7 @@ RUN buildDeps='xz-utils' \
|
||||||
ppc64el) ARCH='ppc64le';; \
|
ppc64el) ARCH='ppc64le';; \
|
||||||
s390x) ARCH='s390x';; \
|
s390x) ARCH='s390x';; \
|
||||||
arm64) ARCH='arm64';; \
|
arm64) ARCH='arm64';; \
|
||||||
|
armhf) ARCH='armv7l';; \
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& set -x \
|
&& set -x \
|
||||||
|
|
|
@ -29,6 +29,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
|
||||||
ppc64el) ARCH='ppc64le';; \
|
ppc64el) ARCH='ppc64le';; \
|
||||||
s390x) ARCH='s390x';; \
|
s390x) ARCH='s390x';; \
|
||||||
arm64) ARCH='arm64';; \
|
arm64) ARCH='arm64';; \
|
||||||
|
armhf) ARCH='armv7l';; \
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
||||||
|
|
|
@ -29,6 +29,7 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
|
||||||
ppc64el) ARCH='ppc64le';; \
|
ppc64el) ARCH='ppc64le';; \
|
||||||
s390x) ARCH='s390x';; \
|
s390x) ARCH='s390x';; \
|
||||||
arm64) ARCH='arm64';; \
|
arm64) ARCH='arm64';; \
|
||||||
|
armhf) ARCH='armv7l';; \
|
||||||
*) echo "unsupported architecture"; exit 1 ;; \
|
*) echo "unsupported architecture"; exit 1 ;; \
|
||||||
esac \
|
esac \
|
||||||
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" \
|
||||||
|
|
|
@ -3,3 +3,4 @@ amd64 default,alpine,onbuild,slim,stretch,wheezy
|
||||||
ppc64le default,onbuild,slim,stretch
|
ppc64le default,onbuild,slim,stretch
|
||||||
s390x default,onbuild,slim,stretch
|
s390x default,onbuild,slim,stretch
|
||||||
arm64v8 default,onbuild,slim,stretch
|
arm64v8 default,onbuild,slim,stretch
|
||||||
|
arm32v7 default,onbuild,slim,stretch
|
||||||
|
|
|
@ -22,6 +22,9 @@ function get_arch() {
|
||||||
aarch64)
|
aarch64)
|
||||||
arch="arm64"
|
arch="arm64"
|
||||||
;;
|
;;
|
||||||
|
armv7l)
|
||||||
|
arch="arm32v7"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$0 does not support architecture $arch ... aborting"
|
echo "$0 does not support architecture $arch ... aborting"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -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/^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 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
|
sed -E -i.bak 's/^(ENV YARN_VERSION ).*/\1'"$yarnVersion"'/' "$dockerfile" && rm "$dockerfile".bak
|
||||||
if [[ "${version/.*/}" -ge 8 || "$arch" = "ppc64le" || "$arch" = "s390x" || "$arch" = "arm64" ]]; then
|
if [[ "${version/.*/}" -ge 8 || "$arch" = "ppc64le" || "$arch" = "s390x" || "$arch" = "arm64" || "$arch" = "arm32v7" ]]; then
|
||||||
sed -E -i.bak 's/FROM (.*)alpine:3.4/FROM \1alpine:3.6/' "$dockerfile"
|
sed -E -i.bak 's/FROM (.*)alpine:3.4/FROM \1alpine:3.6/' "$dockerfile"
|
||||||
rm "$dockerfile.bak"
|
rm "$dockerfile.bak"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue