Adding your git ssh keys to docker container (for linux)

I wanted to have an option to use ssh keys I use for git not only on host machine but also on remote one made by docker. To do that I tried several ways how to push this key to container. There are some info on SSH forwarding but in the end what worked best for me is just simple mounting a file (ssh key) to php container (using docker4drupal by wodby).

Having multiple drush versions on a enviroment

Do this on your local or virtual enviroment, depending where do you want to have it

mkdir ~/drush10
cd ~/drush10
composer require "drush/drush:10.*"

this will install drush10 to that directory and now you just need to add alias

Docker-sync commands

To start docker sync in foreground and see what is actually synching use this

docker-sync start --foreground

to do one time synch, use this

docker-sync sync

 

Docker/Vagrant on Mac speed tests

So file synching is a pain int he ass on MacOS so I made some tests with "wrk" tool to see what is what and how much request per second can each config handle. I started with install.php on D8 site as it is more about file and less about database and caching. Tool was used with this config (30s of requests) 

Setting Ngrok with Docker or Vagrant

Ngrok is great tool, to set it up to work with docker and your specific localhost you need to have account, make authtoken command and then run following to receive both http and https versions of your local environment exposed to internet.

Solr with Drupal and docker (wodby docker4drupal) using search api solr

With docker4drupal its easy to enable solr whith docker-compose, its is also easy to do that with other drupal docker bundles. But to make this work it needs some manual work as well. First you need to make sure solr runs properly, test it, see that url to it shows it runs.