In container php-fpm and nginx works by user www and group www with GUI and UID 7373 please create this user locally.
mkdir magento2 && cd magento2
git clone [email protected]:pusachev/docker-magento2-light.git env/
git clone {your-magento-code-repository} src/
or
mkdir src && copy /you/magento2 src/
zcat dump-magento2.sql.gz | mysql -P 3309 -h 127.0.0.1 -u root -proot magento
cd src/ && cp ../env/env.php app/etc/env.php
docker exec -itu www php-fpm composer create-project --repository=https://repo.magento.com/ magento/project-community-edition /var/www/current/src
docker exec -itu www php-fpm /var/www/current/src/bin/magento sampledata:deploy
docker exec -itu www php-fpm /var/www/current/src/bin/magento setup:install --base-url=http://magento2.test/ --db-host=mysql --db-name=magento --db-user=root --db-password=root --admin-firstname=Magento --admin-lastname=User [email protected] --admin-user=admin --admin-password=admin123 --language=en_AU --currency=AUD --timezone=Australia/Melbourne --cleanup-database --use-rewrites=1
Please add code in you env.php
...
'cache' => [
'frontend' => [
'default' => [
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' => [
'server' => 'redis',
'database' => '0',
'port' => '6379'
],
],
'page_cache' => [
'backend' => 'Cm_Cache_Backend_Redis',
'backend_options' => [
'server' => 'redis',
'port' => '6379',
'database' => '1',
'compress_data' => '0'
]
]
]
],
...
Please add code in you env.php
...
'session' =>
[
'save' => 'redis',
'redis' =>
[
'host' => 'redis',
'port' => '6379',
'password' => '',
'timeout' => '2.5',
'persistent_identifier' => '',
'database' => '2',
'compression_threshold' => '2048',
'compression_library' => 'gzip',
'log_level' => '3',
'max_concurrency' => '6',
'break_after_frontend' => '5',
'break_after_adminhtml' => '30',
'first_lifetime' => '600',
'bot_first_lifetime' => '60',
'bot_lifetime' => '7200',
'disable_locking' => '0',
'min_lifetime' => '60',
'max_lifetime' => '2592000'
]
],
...