bka / docker-magento2

1 stars 1 forks source link

make init fails #1

Closed aweb3r closed 7 years ago

aweb3r commented 7 years ago

myuser@myuser:~/git/docker-magento2$ make init
make init-permissions
make[1]: Entering directory '/home/myuser/git/docker-magento2'
sudo chmod -R 775 Source/var
chmod: cannot access 'Source/var': No such file or directory
Makefile:7: recipe for target 'init-permissions' failed
make[1]: *** [init-permissions] Error 1
make[1]: Leaving directory '/home/myuser/git/docker-magento2'
Makefile:2: recipe for target 'init' failed
make: *** [init] Error 2
myuser@myuser:~/git/docker-magento2$ cat Makefile 
init:
    make init-permissions
    docker-compose run --rm --no-deps --user=www-data php bash -c 'composer install'
    scripts/magento-install.sh

init-permissions:
    sudo chmod -R 775 Source/var
    sudo chmod -R 775 Source/app/etc
    sudo chmod -R 775 Source/pub/media
    sudo chmod -R 775 Source/pub/static
    sudo chmod -R 775 Source
    sudo chgrp -R www-data Source
    chmod +x scripts/*.sh

reinit-docker:
    docker-compose stop php
    docker-compose rm --force php
    docker-compose build php
    docker-compose start
    docker-compose up -d

refresh:
    rm -rf Source/var/generation/*
    rm -rf Source/var/di/*
    rm -rf Source/var/cache/*
    rm -rf Source/var/view_preprocessed/*
    rm -rf Source/pub/static/_requirejs
    rm -rf Source/pub/static/adminhtml
    rm -rf Source/pub/static/frontend
myuser@myuser:~/git/docker-magento2$ docker-compose run --rm --no-deps --user=www-data php bash -c 'composer install'
Composer could not find a composer.json file in /var/www/html
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
myuser@myuser:~/git/docker-magento2$ docker-compose run --rm --no-deps --user=www-data php bash
www-data@4a50e011c798:~/html$ ls
www-data@4a50e011c798:~/html$ ls -la
total 8
drwxr-xr-x 2 1000 1000 4096 Mar 10 18:19 .
drwxr-xr-x 1 root root 4096 Aug 17  2016 ..
-rw-r--r-- 1 1000 1000    0 Mar 10 18:19 .gitkeep
www-data@4a50e011c798:~/html$ 
´´´
aweb3r commented 7 years ago

Simple solution:

read the README:

Clone Magento 2 into Source folder and call...

So run in Source/ git clone https://github.com/magento/magento2.git