xdebug error
xdebug - failed to solve with frontend dockerfile.v0: failed to create LLB definition: dockerfile parse error line 45: unknown instruction: ZEND_EXTENSION=XDEBUG.SO
How I got here
Running the following Docker command
docker-compose up
Generated this output:
Run Drupal 9 with Composer + Docker-compose + Nginx + MariaDB + PHP8.1
Running Docker
Dangerous word... I'm assuming that Docker is installed. Don't know how to check? Using Terminal (I prefer iTerm2), run the following command
docker -D info
The set-up
Go to your project directory, and create a docker folder and a “docker-compose.yml” file:
Set-up Docker for Drupal
Is Docker installed?
Check if your installation is ok and spin up Docker as well:
docker -D info
Using Docker
Now it's time to download and install docker images. Using the official images of MariaDB and Drupal. If you don’t specify the absolute URL to the image it will be searched and downloaded from Docker Hub. Tag 'latest' will be used by default.
env: php: No such file or directory
In terminal I ran a regular command - compose update. Something I've completed thousands of times previously. However, this time I received the following response:
env: php: No such file or directory
Docker - creating a container / image
Create and push to Docker Hub
Creating your own custom image... you need to have a Docker ID. Not sure, well most likely you created it to download Docker Desktop. If you don't have one, go to Docker and sign up.
In your text editor create a file called Dockerfile in the same directory you want to have as your local site. No extension, just Dockerfile. Paste in this code and save the file:
change - theme_get_setting() is deprecated, use theme_handler instead
If you are using theme_get_settings, such as:
$value = trim(theme_get_setting('my_setting'));
Then in your code editor you will also be seeing undefined function 'theme_get_setting'. This function has been deprecated for some time.
Updating Composer
Running composer on a server... when running the command composer update, screen would error out. In the site directory, composer would show
composer --version
Composer version 1.10.24 2021-12-09 20:06:33
Whereas, the commnd
/opt/plesk/php/7.4/bin/php /usr/lib64/plesk-9.0/composer.phar --version Composer version 2.2.5 2022-01-21 17:25:52
Ok, so composer on the server is running 2.2x. But on my site directory, 1.x
Resetting Docker
Resetting Docker is basically following the start parameters. All containers removed -
No containers running
Try running a container: Copy and paste this command into your terminal
docker run -d -p 80:80 docker/getting-started
Unable to find image 'docker/getting-started:latest' locally latest: Pulling from docker/getting-started
Adding Solr authentication to your server
Adding basic security to your server, requires altering the security.json file. For me this file was located
/var/solr/data/
Add a User or Edit a Password
The set-user command allows you to add users and change their passwords. For example, the following defines two users and their passwords: