Auth file for magento 2 installation (#2022)
This commit is contained in:

committed by
Shao Yu-Lung (Allen)

parent
cf6a9ba2c9
commit
2d7b780e56
@ -118,6 +118,9 @@ USER root
|
||||
# Add the composer.json
|
||||
COPY ./composer.json /home/laradock/.composer/composer.json
|
||||
|
||||
# Add the auth.json for magento 2 credentials
|
||||
COPY ./auth.json /home/laradock/.composer/auth.json
|
||||
|
||||
# Make sure that ~/.composer belongs to laradock
|
||||
RUN chown -R laradock:laradock /home/laradock/.composer
|
||||
|
||||
@ -132,6 +135,15 @@ RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
|
||||
composer global install \
|
||||
;fi
|
||||
|
||||
# Check if auth file is disabled
|
||||
ARG COMPOSER_AUTH=false
|
||||
ENV COMPOSER_AUTH ${COMPOSER_AUTH}
|
||||
|
||||
RUN if [ ${COMPOSER_AUTH} = false ]; then \
|
||||
# remove the file
|
||||
rm /home/laradock/.composer/auth.json
|
||||
;fi
|
||||
|
||||
ARG COMPOSER_REPO_PACKAGIST
|
||||
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
|
||||
|
||||
|
Reference in New Issue
Block a user