Skip to content

Commit d725482

Browse files
committed
fix: NVM initialization in non-interactive shells for PHP 8.3
Add /etc/profile.d/nvm.sh script to ensure NVM is initialized in all shell types, including non-interactive shells from docker compose exec commands. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent a78c9e4 commit d725482

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.docker/Dockerfile.php83

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ RUN chmod uga+x /usr/local/bin/install-php-extensions && sync \
5959
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash \
6060
&& export NVM_DIR="/root/.nvm" \
6161
&& . "$NVM_DIR/nvm.sh" \
62-
&& nvm install 22 \
63-
&& nvm alias default 22
62+
&& nvm install 24 \
63+
&& nvm alias default 24 \
64+
&& echo 'export NVM_DIR="/root/.nvm"' > /etc/profile.d/nvm.sh \
65+
&& echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> /etc/profile.d/nvm.sh
6466

6567
COPY config/php/* /usr/local/etc/php/conf.d/
6668
COPY scripts/* /var/www/scripts/

0 commit comments

Comments
 (0)