@@ -123,6 +123,13 @@ RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
123123 composer global install \
124124;fi
125125
126+ ARG COMPOSER_REPO_PACKAGIST
127+ ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
128+
129+ RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \
130+ composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \
131+ ;fi
132+
126133#####################################
127134# Crontab
128135#####################################
@@ -302,13 +309,18 @@ ENV NODE_VERSION ${NODE_VERSION}
302309ARG INSTALL_NODE=false
303310ENV INSTALL_NODE ${INSTALL_NODE}
304311ENV NVM_DIR /home/laradock/.nvm
312+ ARG NPM_REGISTRY
313+ ENV NPM_REGISTRY ${NPM_REGISTRY}
305314RUN if [ ${INSTALL_NODE} = true ]; then \
306315 # Install nvm (A Node Version Manager)
307316 curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash && \
308317 . $NVM_DIR/nvm.sh && \
309318 nvm install ${NODE_VERSION} && \
310319 nvm use ${NODE_VERSION} && \
311320 nvm alias ${NODE_VERSION} && \
321+ if [ ${NPM_REGISTRY} ]; then \
322+ npm config set registry ${NPM_REGISTRY} \
323+ ;fi && \
312324 npm install -g gulp bower vue-cli \
313325;fi
314326
@@ -332,6 +344,9 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
332344# Add PATH for node
333345ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
334346
347+ RUN if [ ${NPM_REGISTRY} ]; then \
348+ . ~/.bashrc && npm config set registry ${NPM_REGISTRY} \
349+ ;fi
335350
336351#####################################
337352# YARN:
@@ -442,6 +457,13 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
442457#####################################
443458USER root
444459
460+ ARG COMPOSER_REPO_PACKAGIST
461+ ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
462+
463+ RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \
464+ composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \
465+ ;fi
466+
445467ARG INSTALL_LARAVEL_INSTALLER=false
446468ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER}
447469
0 commit comments