@@ -127,6 +127,13 @@ RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
127127 composer global install \
128128;fi
129129
130+ ARG COMPOSER_REPO_PACKAGIST
131+ ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
132+
133+ RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \
134+ composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \
135+ ;fi
136+
130137# Export composer vendor path
131138RUN echo "" >> ~/.bashrc && \
132139echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc
@@ -309,6 +316,8 @@ ARG NODE_VERSION=stable
309316ENV NODE_VERSION ${NODE_VERSION}
310317ARG INSTALL_NODE=false
311318ENV INSTALL_NODE ${INSTALL_NODE}
319+ ARG NPM_REGISTRY
320+ ENV NPM_REGISTRY ${NPM_REGISTRY}
312321ENV NVM_DIR /home/laradock/.nvm
313322RUN if [ ${INSTALL_NODE} = true ]; then \
314323 # Install nvm (A Node Version Manager)
@@ -317,6 +326,9 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
317326 nvm install ${NODE_VERSION} && \
318327 nvm use ${NODE_VERSION} && \
319328 nvm alias ${NODE_VERSION} && \
329+ if [ ${NPM_REGISTRY} ]; then \
330+ npm config set registry ${NPM_REGISTRY} \
331+ ;fi && \
320332 npm install -g gulp bower vue-cli \
321333;fi
322334
@@ -340,6 +352,10 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
340352# Add PATH for node
341353ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
342354
355+ RUN if [ ${NPM_REGISTRY} ]; then \
356+ . ~/.bashrc && npm config set registry ${NPM_REGISTRY} \
357+ ;fi
358+
343359#####################################
344360# YARN:
345361#####################################
@@ -428,6 +444,13 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \
428444#####################################
429445USER root
430446
447+ ARG COMPOSER_REPO_PACKAGIST
448+ ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
449+
450+ RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \
451+ composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \
452+ ;fi
453+
431454ARG INSTALL_LARAVEL_INSTALLER=true
432455ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER}
433456
0 commit comments