Skip to content

Instantly share code, notes, and snippets.

@szeidler
Last active August 27, 2017 15:34
Show Gist options
  • Save szeidler/d86181cfebcea48dce3becba2c17f9a8 to your computer and use it in GitHub Desktop.
Save szeidler/d86181cfebcea48dce3becba2c17f9a8 to your computer and use it in GitHub Desktop.
Update docker4drupal images to recent version - recursive.
#!/bin/bash
# Update PHP 7.0
find . -maxdepth 2 -name "docker-compose.yml" -exec sed -i '' 's#wodby/drupal-php:7.0-[0-9].[0-9].[0-9]#wodby/drupal-php:7.0-2.4.6#g' '{}' \;
# Update PHP 7.1
find . -maxdepth 2 -name "docker-compose.yml" -exec sed -i '' 's#wodby/drupal-php:7.1-[0-9].[0-9].[0-9]#wodby/drupal-php:7.1-2.4.6#g' '{}' \;
# Update MariaDB
find . -maxdepth 2 -name "docker-compose.yml" -exec sed -i '' 's#wodby/mariadb:10.1-[0-9].[0-9].[0-9]#wodby/mariadb:10.1-2.3.4#g' '{}' \;
# Update Redis
find . -maxdepth 2 -name "docker-compose.yml" -exec sed -i '' 's#wodby/redis:3.2-[0-9].[0-9].[0-9]#wodby/redis:3.2-2.1.3#g' '{}' \;
# Update Varnish
find . -maxdepth 2 -name "docker-compose.yml" -exec sed -i '' 's#wodby/drupal-varnish:4.1-[0-9].[0-9].[0-9]#wodby/drupal-varnish:4.1-2.1.3#g' '{}' \;
# Update Drupal 7 based images
find . -maxdepth 2 -name "docker-compose.yml" -exec sed -i '' 's#wodby/drupal-nginx:7-[0-9].[0-9]#2-[0-9].[0-9].[0-9]#wodby/drupal-nginx:7-1.13-2.4.4#g' '{}' \;
find . -maxdepth 2 -name "docker-compose.yml" -exec sed -i '' 's#wodby/drupal-solr:7-5.4-[0-9].[0-9].[0-9]#wodby/drupal-solr:7-5.4-2.2.0#g' '{}' \;
# Update Drupal 8 based images
find . -maxdepth 2 -name "docker-compose.yml" -exec sed -i '' 's#wodby/drupal-nginx:8-[0-9].[0-9]#2-[0-9].[0-9].[0-9]#wodby/drupal-nginx:8-1.13-2.4.4#g' '{}' \;
find . -maxdepth 2 -name "docker-compose.yml" -exec sed -i '' 's#wodby/drupal-solr:8-6.6-[0-9].[0-9].[0-9]#wodby/drupal-solr:8-6.6-2.2.0#g' '{}' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment