Configuration to switch between composer version 1 or 2

This commit is contained in:
Ivan Djurdjevac 2021-01-16 08:34:05 +01:00
parent 4cf39da90d
commit 4bb1fe281d
3 changed files with 7 additions and 0 deletions

View File

@ -110,6 +110,7 @@ services:
- INSTALL_OCI8=${WORKSPACE_INSTALL_OCI8}
- INSTALL_V8JS=${WORKSPACE_INSTALL_V8JS}
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
- COMPOSER_VERSION=${WORKSPACE_COMPOSER_VERSION}
- COMPOSER_AUTH=${WORKSPACE_COMPOSER_AUTH}
- COMPOSER_REPO_PACKAGIST=${WORKSPACE_COMPOSER_REPO_PACKAGIST}
- INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH}

View File

@ -100,6 +100,7 @@ SHELL_OH_MY_ZSH_ALIASES=false
WORKSPACE_BASE_IMAGE_TAG_PREFIX=latest
WORKSPACE_COMPOSER_GLOBAL_INSTALL=true
WORKSPACE_COMPOSER_VERSION=2
WORKSPACE_COMPOSER_AUTH=false
WORKSPACE_COMPOSER_REPO_PACKAGIST=
WORKSPACE_NVM_NODEJS_ORG_MIRROR=

View File

@ -147,6 +147,11 @@ RUN chown -R laradock:laradock /home/laradock/.composer
RUN echo "" >> ~/.bashrc && \
echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"' >> ~/.bashrc
# Update composer
ARG COMPOSER_VERSION=2
ENV COMPOSER_VERSION ${COMPOSER_VERSION}
RUN composer self-update --${COMPOSER_VERSION}
USER laradock
# Check if global install need to be ran