diff --git a/10/alpine3.10/Dockerfile b/10/alpine3.10/Dockerfile index 02dc33c23d..ebad2ff468 100644 --- a/10/alpine3.10/Dockerfile +++ b/10/alpine3.10/Dockerfile @@ -33,7 +33,7 @@ RUN addgroup -g 1000 node \ libgcc \ linux-headers \ make \ - python \ + python2 \ # gpg keys listed at https://github.com/nodejs/node#release-keys && for key in \ 4ED778F539E3634C779C87C6D7062848A1AB005C \ diff --git a/10/alpine3.11/Dockerfile b/10/alpine3.11/Dockerfile index cd6555a035..b6472e4091 100644 --- a/10/alpine3.11/Dockerfile +++ b/10/alpine3.11/Dockerfile @@ -33,7 +33,7 @@ RUN addgroup -g 1000 node \ libgcc \ linux-headers \ make \ - python \ + python2 \ # gpg keys listed at https://github.com/nodejs/node#release-keys && for key in \ 4ED778F539E3634C779C87C6D7062848A1AB005C \ diff --git a/10/alpine3.9/Dockerfile b/10/alpine3.9/Dockerfile index f9386040b7..8cdfc97999 100644 --- a/10/alpine3.9/Dockerfile +++ b/10/alpine3.9/Dockerfile @@ -33,7 +33,7 @@ RUN addgroup -g 1000 node \ libgcc \ linux-headers \ make \ - python \ + python2 \ # gpg keys listed at https://github.com/nodejs/node#release-keys && for key in \ 4ED778F539E3634C779C87C6D7062848A1AB005C \ diff --git a/12/alpine3.10/Dockerfile b/12/alpine3.10/Dockerfile index cd2620eee0..c9a0c86741 100644 --- a/12/alpine3.10/Dockerfile +++ b/12/alpine3.10/Dockerfile @@ -33,7 +33,7 @@ RUN addgroup -g 1000 node \ libgcc \ linux-headers \ make \ - python \ + python2 \ # gpg keys listed at https://github.com/nodejs/node#release-keys && for key in \ 4ED778F539E3634C779C87C6D7062848A1AB005C \ diff --git a/12/alpine3.11/Dockerfile b/12/alpine3.11/Dockerfile index 5e79ebe1d0..77baec2805 100644 --- a/12/alpine3.11/Dockerfile +++ b/12/alpine3.11/Dockerfile @@ -33,7 +33,7 @@ RUN addgroup -g 1000 node \ libgcc \ linux-headers \ make \ - python \ + python2 \ # gpg keys listed at https://github.com/nodejs/node#release-keys && for key in \ 4ED778F539E3634C779C87C6D7062848A1AB005C \ diff --git a/12/alpine3.12/Dockerfile b/12/alpine3.12/Dockerfile index 65eb5db0a2..e616a2a018 100644 --- a/12/alpine3.12/Dockerfile +++ b/12/alpine3.12/Dockerfile @@ -33,7 +33,7 @@ RUN addgroup -g 1000 node \ libgcc \ linux-headers \ make \ - python \ + python2 \ # gpg keys listed at https://github.com/nodejs/node#release-keys && for key in \ 4ED778F539E3634C779C87C6D7062848A1AB005C \ diff --git a/12/alpine3.9/Dockerfile b/12/alpine3.9/Dockerfile index 4ef5645957..d0e502dc9f 100644 --- a/12/alpine3.9/Dockerfile +++ b/12/alpine3.9/Dockerfile @@ -33,7 +33,7 @@ RUN addgroup -g 1000 node \ libgcc \ linux-headers \ make \ - python \ + python2 \ # gpg keys listed at https://github.com/nodejs/node#release-keys && for key in \ 4ED778F539E3634C779C87C6D7062848A1AB005C \ diff --git a/14/alpine3.10/Dockerfile b/14/alpine3.10/Dockerfile index ecfca31a42..32aaeac8eb 100644 --- a/14/alpine3.10/Dockerfile +++ b/14/alpine3.10/Dockerfile @@ -33,7 +33,7 @@ RUN addgroup -g 1000 node \ libgcc \ linux-headers \ make \ - python \ + python3 \ # gpg keys listed at https://github.com/nodejs/node#release-keys && for key in \ 4ED778F539E3634C779C87C6D7062848A1AB005C \ diff --git a/14/alpine3.11/Dockerfile b/14/alpine3.11/Dockerfile index fa72e9d520..a7fb317b65 100644 --- a/14/alpine3.11/Dockerfile +++ b/14/alpine3.11/Dockerfile @@ -33,7 +33,7 @@ RUN addgroup -g 1000 node \ libgcc \ linux-headers \ make \ - python \ + python3 \ # gpg keys listed at https://github.com/nodejs/node#release-keys && for key in \ 4ED778F539E3634C779C87C6D7062848A1AB005C \ diff --git a/14/alpine3.12/Dockerfile b/14/alpine3.12/Dockerfile index 22bdc75d23..9f6345587b 100644 --- a/14/alpine3.12/Dockerfile +++ b/14/alpine3.12/Dockerfile @@ -33,7 +33,7 @@ RUN addgroup -g 1000 node \ libgcc \ linux-headers \ make \ - python \ + python3 \ # gpg keys listed at https://github.com/nodejs/node#release-keys && for key in \ 4ED778F539E3634C779C87C6D7062848A1AB005C \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 34700211fd..f5c4c949f7 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -33,7 +33,7 @@ RUN addgroup -g 1000 node \ libgcc \ linux-headers \ make \ - python \ + ${PYTHON_VERSION} \ # gpg keys listed at https://github.com/nodejs/node#release-keys && for key in \ "${NODE_KEYS[@]}" diff --git a/update.sh b/update.sh index 8b66a6e55e..eaa3e78e17 100755 --- a/update.sh +++ b/update.sh @@ -167,6 +167,15 @@ function update_node_version() { )\"" sed -Ei -e "s/(alpine:)0.0/\\1${alpine_version}/" "${dockerfile}-tmp" sed -Ei -e "s/CHECKSUM=CHECKSUM_x64/CHECKSUM=${checksum}/" "${dockerfile}-tmp" + + # Use python2 for nodejs < 14 on alpine + if [ "$version" -lt 14 ]; then + pythonVersion="python2" + else + pythonVersion="python3" + fi + + sed -Ei -e 's/\$\{PYTHON_VERSION\}/'"${pythonVersion}"'/' "${dockerfile}-tmp" elif is_debian "${variant}"; then sed -Ei -e "s/(buildpack-deps:)name/\\1${variant}/" "${dockerfile}-tmp" elif is_debian_slim "${variant}"; then