Skip to content

Commit e576542

Browse files
committed
feat: php-tools bin directory set globally
When the container is as the base environment for a devcontainer the executing user is going to be vscode, thus the PATH change made strictly within the root users home directory will not apply
1 parent af00895 commit e576542

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Dockerfile.php7-review

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RUN cd php-tools && COMPOSER_MEMORY_LIMIT=-1 /usr/bin/composer install
1717
RUN curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s
1818
RUN mv /opt/bin/reviewdog /usr/local/bin
1919

20-
# add php-tools to search path
21-
RUN echo "export PATH=$PATH:/opt/php-tools/bin" >> /root/.bashrc
20+
# add php-tools to search path globally
21+
RUN echo "export PATH=$PATH:/opt/php-tools/bin" >> /etc/bash.bashrc
2222

2323
ENTRYPOINT ["apache2-foreground"]

Dockerfile.php8-review

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ RUN cd php-tools && COMPOSER_MEMORY_LIMIT=-1 /usr/bin/composer install
1717
RUN curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s
1818
RUN mv /opt/bin/reviewdog /usr/local/bin
1919

20-
# add php-tools to search path
21-
RUN echo "export PATH=$PATH:/opt/php-tools/bin" >> /root/.bashrc
20+
# add php-tools to search path globally
21+
RUN echo "export PATH=$PATH:/opt/php-tools/bin" >> /etc/bash.bashrc
2222

2323
RUN composer global require icanhazstring/composer-unused \
2424
&& ln -s /root/.config/composer/vendor/bin/composer-unused /usr/local/bin/composer-unused

0 commit comments

Comments
 (0)