Skip to content

Commit a348ca3

Browse files
authored
Allow NODE_VERSION variable. (#261)
1 parent 533d0ad commit a348ca3

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

runtimes/7.4/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ WORKDIR /var/www/html
88

99
ENV DEBIAN_FRONTEND noninteractive
1010
ENV TZ=UTC
11+
ENV NODE_VERSION=16
1112

1213
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
1314

@@ -29,7 +30,7 @@ RUN apt-get update \
2930
php7.4-msgpack php7.4-igbinary php7.4-ldap \
3031
php7.4-redis php7.4-xdebug \
3132
&& php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \
32-
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \
33+
&& curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - \
3334
&& apt-get install -y nodejs \
3435
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
3536
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \

runtimes/8.0/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ WORKDIR /var/www/html
88

99
ENV DEBIAN_FRONTEND noninteractive
1010
ENV TZ=UTC
11+
ENV NODE_VERSION=16
1112

1213
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
1314

@@ -29,7 +30,7 @@ RUN apt-get update \
2930
php8.0-msgpack php8.0-igbinary php8.0-ldap \
3031
php8.0-redis php8.0-swoole php8.0-xdebug \
3132
&& php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \
32-
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \
33+
&& curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - \
3334
&& apt-get install -y nodejs \
3435
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
3536
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \

runtimes/8.1/Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ WORKDIR /var/www/html
88

99
ENV DEBIAN_FRONTEND noninteractive
1010
ENV TZ=UTC
11+
ENV NODE_VERSION=16
1112

1213
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
1314

@@ -30,7 +31,7 @@ RUN apt-get update \
3031
# php8.1-msgpack php8.1-igbinary php8.1-redis php8.1-swoole \
3132
# php8.1-memcached php8.1-pcov php8.1-xdebug \
3233
&& php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer \
33-
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \
34+
&& curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - \
3435
&& apt-get install -y nodejs \
3536
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
3637
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \

0 commit comments

Comments
 (0)