Auth file for magento 2 installation (#2022)
This commit is contained in:
parent
cf6a9ba2c9
commit
2d7b780e56
|
@ -1543,6 +1543,23 @@ Enabling Global Composer Install during the build for the container allows you t
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Magento-2-authentication-credentials"></a>
|
||||||
|
## Magento 2 authentication credential (composer install)
|
||||||
|
|
||||||
|
1 - Open the `.env` file
|
||||||
|
|
||||||
|
2 - Search for the `WORKSPACE_COMPOSER_AUTH` argument under the Workspace Container and set it to `true`
|
||||||
|
|
||||||
|
3 - Now add your credentials to `workspace/auth.json`
|
||||||
|
|
||||||
|
4 - Re-build the Workspace Container `docker-compose build workspace`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="Install-Prestissimo"></a>
|
<a name="Install-Prestissimo"></a>
|
||||||
## Install Prestissimo
|
## Install Prestissimo
|
||||||
|
|
|
@ -78,6 +78,7 @@ services:
|
||||||
- INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
|
- INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
|
||||||
- INSTALL_V8JS=${WORKSPACE_INSTALL_V8JS}
|
- INSTALL_V8JS=${WORKSPACE_INSTALL_V8JS}
|
||||||
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
|
- COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL}
|
||||||
|
- COMPOSER_AUTH=${WORKSPACE_COMPOSER_AUTH}
|
||||||
- COMPOSER_REPO_PACKAGIST=${WORKSPACE_COMPOSER_REPO_PACKAGIST}
|
- COMPOSER_REPO_PACKAGIST=${WORKSPACE_COMPOSER_REPO_PACKAGIST}
|
||||||
- INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH}
|
- INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH}
|
||||||
- INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY}
|
- INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY}
|
||||||
|
|
|
@ -82,6 +82,7 @@ DOCKER_SYNC_STRATEGY=native_osx
|
||||||
### WORKSPACE #############################################
|
### WORKSPACE #############################################
|
||||||
|
|
||||||
WORKSPACE_COMPOSER_GLOBAL_INSTALL=true
|
WORKSPACE_COMPOSER_GLOBAL_INSTALL=true
|
||||||
|
WORKSPACE_COMPOSER_AUTH=false
|
||||||
WORKSPACE_COMPOSER_REPO_PACKAGIST=
|
WORKSPACE_COMPOSER_REPO_PACKAGIST=
|
||||||
WORKSPACE_INSTALL_NODE=true
|
WORKSPACE_INSTALL_NODE=true
|
||||||
WORKSPACE_NODE_VERSION=node
|
WORKSPACE_NODE_VERSION=node
|
||||||
|
|
|
@ -118,6 +118,9 @@ USER root
|
||||||
# Add the composer.json
|
# Add the composer.json
|
||||||
COPY ./composer.json /home/laradock/.composer/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
|
# Make sure that ~/.composer belongs to laradock
|
||||||
RUN chown -R laradock:laradock /home/laradock/.composer
|
RUN chown -R laradock:laradock /home/laradock/.composer
|
||||||
|
|
||||||
|
@ -132,6 +135,15 @@ RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
|
||||||
composer global install \
|
composer global install \
|
||||||
;fi
|
;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
|
ARG COMPOSER_REPO_PACKAGIST
|
||||||
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
|
ENV COMPOSER_REPO_PACKAGIST ${COMPOSER_REPO_PACKAGIST}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"http-basic": {
|
||||||
|
"repo.magento.com": {
|
||||||
|
"username": "",
|
||||||
|
"password": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue