Skip to content

Commit 0fca7a8

Browse files
committed
Replace deprecated install scripts for AmazonLinux integration tests
1 parent 8c90521 commit 0fca7a8

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

test/integration/docker/Dockerfile.echo.amazonlinux

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,16 @@ ARG DISTRO_VERSION
1212
# Install Py3 required to build Node16+
1313
RUN if [[ "${DISTRO_VERSION}" == "2" ]] ; then amazon-linux-extras install python3.8 && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 ; fi
1414
# Install NodeJS
15-
RUN curl -sL https://rpm.nodesource.com/setup_${RUNTIME_VERSION}.x | bash - && \
16-
yum install -y nodejs
17-
15+
RUN if [[ "${RUNTIME_VERSION}" == "14" ]]; then \
16+
yum install -y tar gzip xz && \
17+
AARCH="$([[ "$(arch)" == "x86_64" ]] && echo "x64" || echo "arm64")" && \
18+
NODE_URL="https://nodejs.org/download/release/v14.21.3/node-v14.21.3-linux-$AARCH.tar.xz" && \
19+
curl -fL "$NODE_URL" | tar -C /usr --strip-components 1 -xJf - && \
20+
yum clean all -q && rm -rf /var/cache/yum ; \
21+
else \
22+
yum install https://rpm.nodesource.com/pub_${RUNTIME_VERSION}.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y && \
23+
yum install nodejs -y --setopt=nodesource-nodejs.module_hotfixes=1s ; \
24+
fi
1825

1926
# Stage 2 - build function and dependencies
2027
FROM node-amazonlinux AS build-image

0 commit comments

Comments
 (0)