Skip to content

Commit 9de46ad

Browse files
committed
refactor: install composer in userland
1 parent 74ea867 commit 9de46ad

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ RUN install-php-extensions \
3030
zip \
3131
intl \
3232
&& \
33-
mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" && \
34-
curl -sSL https://getcomposer.org/installer | php && \
35-
chmod +x composer.phar && \
36-
mv composer.phar /usr/local/bin/composer
33+
mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
3734

3835
RUN groupadd -g 1001 vscode && \
3936
useradd -s /bin/zsh -m -u 1001 -g vscode vscode && \
@@ -42,7 +39,13 @@ RUN groupadd -g 1001 vscode && \
4239

4340
USER vscode
4441

45-
RUN curl --proto '=https' --tlsv1.2 -LsSf https://starship.rs/install.sh | sh -s -- --yes && \
42+
RUN curl -sSL https://getcomposer.org/installer |\
43+
php -- \
44+
--no-ansi \
45+
--install-dir="${HOME}/bin" \
46+
--filename="composer" \
47+
&& \
48+
curl --proto '=https' --tlsv1.2 -LsSf https://starship.rs/install.sh | sh -s -- --yes && \
4649
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/atuinsh/atuin/releases/latest/download/atuin-installer.sh | ATUIN_NO_MODIFY_PATH=1 sh && \
4750
mv ${HOME}/.atuin/bin/* "${HOME}/bin" && \
4851
rm -rf "${HOME}/.atuin" && \

0 commit comments

Comments
 (0)