With the release of Drupal 10, I wanted to take it for a spin, and updated the Shepherd scaffold we use for OpenShift deployments so that things work nicely. If you already have docker, docker-compose & composer installed, try these steps to give it a spin.

Create a new project using the recommended method of the release candidate:
cd /tmp
composer create drupal/recommended-project:^10 drupal10

While this is enough to get things up and going, by adding the Shepherd scaffold, it will make the site almost ready for deploying to OpenShift, docker or Kubernetes easily with a lot of extra information in web/sites/default/settings.php and give a full mysql+redis/memcache with drush and robo setup locally as well. There are just a couple of steps involved.

Change into the newly created project directory:

cd ./drupal10

Update composer.json to allow our additional scaffold to run:

composer config --append allow-plugins.singularo/shepherd-drupal-scaffold true
composer config --append --json extra.drupal-scaffold.allowed-packages '["singularo/shepherd-drupal-scaffold"]'
Finally install the scaffold additions and perform its changes:
composer require singularo/shepherd-drupal-scaffold:dev-develop

Once the installation is complete, the dsh script will be present in the local directory to start up the docker shell, and you can bring the new Drupal 10 site up with a couple of commands:


Wait while any images are built or downloaded. Once the shell prompt appears, give it about 10 seconds longer for the mysql database to come up fully, then build a standard Drupal 10 installation with:

robo build

Once that is complete, access the new Drupal 10 site via the url when the ./dsh command is initially run. Login with user admin and password and have a look around at your new Drupal 10 site. Try the Claro theme. If you want to add modules, the process is straightforward. A simple example of the steps inside the web container using admin toolbar:

composer require drupal/admin_toolbar

After the download, drush can be used to enable the module if you like:

drush en admin_toolbar
There you go, a quick way to try out Drupal 10 easily in a production style docker container. To exit/shutdown the stack:
./dsh stop

If a single command line to paste is more your style, here it is, adjust the PROJECT var and paste away:

composer 2.x

PROJECT=test && \
composer create drupal/recommended-project:^10 ${PROJECT} && \
cd ./${PROJECT} && \
composer2 config extra.drupal-scaffold.allowed-packages --json '["singularo/shepherd-drupal-scaffold"]' && \
composer require singularo/shepherd-drupal-scaffold:dev-develop && \
composer config --unset extra.drupal-core-project-message && \