Hot answers tagged

13

I've been using for the last 6 months the docker images created by Fabrizio Balliano It works nicely on ubuntu. And you have a readme file explaining what you need to do to get it running.


6

You can use those files to setup you docker environment easy to use visit link - https://github.com/markoshust/docker-magento You can setup on both environments windows and mac. I hope so it will help you.


6

The better way is to open your container, you can use the command: docker exec -ti CONTAINER_NAME bash so you will enter into docker container and use all commands that you want execute normally. Remember to access the web container and not the db To exit you can use the command exit.


6

https://hub.docker.com/r/rafaelcgstz/magento2/ I created some images to Magento, this image to Magento 2 has: PHP 7.0 Apache 2.4 Composer MariaDB Magerun DevAlias CLI Utils (GIT, VIM, UNZIP, CURL, WGET) Execute in your terminal, change the MYMAGENTO2 to use the name of your project: curl -s https://raw.githubusercontent.com/clean-docker/Magento2/master/...


4

Especially for Varnish it makes sense to use and test ist during development as you can run into big problems laster. I just read Alan Kent's (Magento Chief Architect) Blogpost today where he explains the issue with Varnish: One particular note is inclusion of Varnish. A very common problem that has become apparent is developers are not testing ...


3

Not sure why this question got downvoted; looking around the Internet there is precious little information about how people should run Magento 2 (Open Source or Enterprise) in a scalable, production, container environment, and there are a lot of little things that are a pain in the butt to handle. Relating to my question above, I am now compiling the code ...


2

I guess you can solve it by running Magento commands inside container. You need to login into container first: docker exec -ti 281cbd203f92 /bin/bash After that you need to change current directory to document root of your Magento, add path to /bin/magento to container PATH variables like: export PATH=$PATH:/var/www/html/magento2/bin After that you can ...


2

In nginx configuration try use upstream fastcgi_backend { server php:9000; }


2

you need to create file .env with following content COMPOSE_CONVERT_WINDOWS_PATHS=1 and put that file next to docker-compose.yml Note : file without name is not possible to make in windows GUI so use command prompt to create file ()


2

The issue is occur because after install magento 2 you haven't deploy its static content. So magento 2 unable to find your css and js. Try run below command in same sequence : To resolve this issue run below commands : php bin/magento deploy:mode:set developer (set the mode of environment is developer) php bin/magento setup:di:compile(it will generate all ...


2

From my experience You should create private repository in github or bitbucket for store all code. You can management all pull/push code by git. Bitbucket is free (good plus) for private repository. For communication between developers you can use Trello , Slack, Skype.. For deployment you can use DockerHub (cloud docker images) for manager all your images ...


2

Generally there can be 2 possibilities: The /var folder doesn't have correct permissions - they should be 755 The /var folder doesn't have the correct ownership - should be the Magento file system owner So you should just check the permission and ownership on that folder and change the one that's causing this problem.


2

Add this to your Dockerfile. RUN \ curl -sS -o n98-magerun.phar https://files.magerun.net/n98-magerun.phar && \ curl -sS -o n98-magerun.phar.sha256 https://files.magerun.net/sha256.php?file=n98-magerun.phar && \ shasum -a 256 -c n98-magerun.phar.sha256 && \ chmod +x n98-magerun.phar && \ mv n98-magerun.phar /usr/local/bin/...


2

Shared Filesystem for Docker on MacOS is nightmarishly slow. I will suggest: Do not use a shared filesystem at all (and use PhpStorm Deploymechanism or http://docker-sync.io/) Share only your code (using composer base instalation and share app/code/YourVendor or app/theme/*/YourVendor)


2

You need to correct your permissions . Do a : rm -rf generated/* rm -rf pub/static/* Than find app/code var/view_preprocessed vendor pub/static app/etc generated/code generated/metadata \( -type f -or -type d \) -exec chmod u-w {} + && chmod o-rwx app/etc/env.php && chmod u+x bin/magento or follow this link for more detail.


2

You need access your container using: docker exec -ti CONTAINER_NAME bash To discover the name use docker ps.


2

it can be installed anywhere where you can run LAMP stack. support and not working is different.


2

For question number 1: — You can go to docker-compose file and look for apache service then change port to something like 8085:80 then your project baseURL would be like 127.0.0.1:8085 or http://localhost:8085/ For question number 2: — I believe, 1 docker file for 1 project only. Otherwise, you need to create another docker file for another project.


2

I know maybe this isn't the answer you are expected but I have a different docker compose file for each project. Once I've finished working on one project I docker-compose down -v project, switch to my working copy in my other project and docker-compose up -d Each project has it's own set of containers which build up a lamp stack. So own db container. But ...


2

To prepare your docker environment for magento 2 you can follow the following steps: Environment docker magento 2 Ubuntu 18.04.2 LTS Apache/2.4.29 Webmin 1.920 Composer 1.8.6 Git 2.17.1


1

Your data is thrown away when you call docker-compose down because it will stop and remove containers, networks, images, and volumes. You should use docker-compose stop


1

I followed the above (moving the /static block inside the /pub block) but it didn't work for me. In the end, what did the trick was then adding in a new block for /static as follows : location /static/ { if (!-f $request_filename) { rewrite ^/static/(version\d*/)?(.*)$ /static.php?resource=$2 last; } } Note that is subtly different to the ...


1

Unfortunately there is no official image so far :( However magento docs have instructions for docker development of enterprise version (magento commerce) Ref: https://devdocs.magento.com/guides/v2.2/cloud/docker/docker-development.html


1

It is because in step 2 you have installed magento using --no-dev param, it has skipped installing dev packages ( source ); --no-dev: Skip installing packages listed in require-dev. The autoloader generation skips the autoload-dev rules.


1

PHP Fatal error: Allowed memory size of xxx bytes exhausted Magento 2 has memory limits defined in the root .htaccess file. These should be sufficient in production but may cause issues when running large installation scripts when developing your site. Adjust memory limit php_value memory_limit 768M php_value max_execution_time 18000 Increase the ...


1

Try running these commands to remove and recreate the folders. Out of the container: sudo rm -rf ./var/composer_home ./composer.lock ./vendor Inside the container: mkdir /var/www/html/vendor/ composer install If Permissions Keep Resetting Add to ./bin/fixperms ./bin/cli find var vendor pub/static pub/media app/etc -type f -exec chmod g+s {} \; ./bin/...


1

Magento integration tests framework requires an installed Magento instance to run a test suite. I will try to explain how it works in general: On the initialization step dev/tests/integration/framework/bootstrap.php reads configuration from dev/tests/integration/phpunit.xml. bootsrap.php initializes instance of \Magento\TestFramework\Application with ...


1

Every time I've run in to this Required parameter 'theme_dir' was not passed error it's because I either deleted or moved or renamed a theme's directory (or a themes parent theme) without properly uninstalling it from the database. There are a a couple ways to fix it, I think, like possibly adding the missing or renamed theme directory back to allow running ...


1

The problem might be that you are installing Magento in the ENTRYPOINT script, which runs every time. You usually want the entrypoint to be some non-interactive daemon, like the PHP service. The ENTRYPOINT specifies a command that will always be executed when the container starts. The CMD specifies arguments that will be fed to the ENTRYPOINT. Here are ...


1

First of all, I'm also a beginner with Magento and Docker, but I think I've managed to make this devbox work. My system: Windows 8.1 with Docker Toolbox Let's start with the SECOND error: Create a folder "shared/webroot" in the same folder where you have your "m2devbox-init.bat" file. In my case, I've set security permissions for "shared" and "webroot" ...


Only top voted, non community-wiki answers of a minimum length are eligible