-
-
Notifications
You must be signed in to change notification settings - Fork 32
Blog: Manually managing tool versions and adding custom utilities #382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
542ad9d
Blog: Manually managing tool versions and adding custom utilities
bserem 4a6c554
Start with terminus
bserem a38a78a
Merge branch 'main' into main
bserem 2c475a3
Update src/content/blog/ddev-bundled-tools-using-custom-versions.md
bserem d05a032
Update src/content/blog/ddev-bundled-tools-using-custom-versions.md
bserem ac39393
Link to documentation on ways to install packages
bserem 3219764
Add resources and contrib section
bserem b009d17
dc
bserem 0585e74
Update src/content/blog/ddev-bundled-tools-using-custom-versions.md
bserem 1a8c583
Apply suggestions from code review
bserem 2ddae22
State the issue
bserem ce3c1ba
Introduce fooscript
bserem 05d9929
Use titles for links
bserem 7c92d08
Fix prettier linter complaints
rfay 684820c
Update src/content/blog/ddev-bundled-tools-using-custom-versions.md
bserem ae70f14
Update src/content/blog/ddev-bundled-tools-using-custom-versions.md
bserem 5493f7e
Update src/content/blog/ddev-bundled-tools-using-custom-versions.md
bserem 6a6f62d
Update src/content/blog/ddev-bundled-tools-using-custom-versions.md
bserem 2602be1
Update src/content/blog/ddev-bundled-tools-using-custom-versions.md
bserem 9fd4cd3
Update src/content/blog/ddev-bundled-tools-using-custom-versions.md
bserem 9fb39e5
pacify prettier
rfay 2a12cf3
Update date
rfay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
name: Bill Seremetis | ||
firstName: Bill | ||
avatarUrl: http://seremetis.net/static/bill.jpg | ||
--- | ||
|
||
[Bill](https://www.drupal.org/u/bserem) is the Managed Services team’s Tech Lead | ||
in [Annertech](https://www.annertech.com), a long time Drupal developer and | ||
DDEV user. | ||
His career started as a site builder, but quickly turned into systems administrator | ||
and backend developer. He loves steering conversations towards workable solutions | ||
and improving developer's lives. | ||
|
||
When not behind a screen you'll find him holding a camera and climbing easy routes. |
73 changes: 73 additions & 0 deletions
73
src/content/blog/ddev-bundled-tools-using-custom-versions.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
title: "How to Downgrade Terminus in DDEV's Web Container and Customize Other Bundled Tools" | ||
pubDate: 2025-06-30 | ||
summary: How to upgrade/downgrade a utility provided by DDEV in `ddev-webserver`, or add a custom utility for a given project | ||
author: Bill Seremetis | ||
featureImage: | ||
src: /img/blog/2025/06/ddev-tool-install.png | ||
alt: "Installing custom software packages in the containerized environment" | ||
shadow: true | ||
categories: | ||
- Guides | ||
- DevOps | ||
--- | ||
|
||
_This guest post is by DDEV community member and [Drupal](https://drupal.org) | ||
contributor [Bill Seremetis](/blog/author/bill-seremetis/) and sponsored by | ||
[Annertech](https://www.annertech.com)._ | ||
|
||
DDEV comes bundled with a predefined set of tools, Pantheon's `terminus` being one of them. | ||
The latest releases of `terminus` are not compatible with older PHP versions like PHP 8.1, though, | ||
so we needed to downgrade it inside DDEV's `ddev-webserver` Docker image. | ||
|
||
This guide covers how to downgrade `terminus` and will also explain how to use the same technique to install | ||
additional custom tools. | ||
|
||
Please note there are many ways to install packages in a container. We will | ||
cover [extra Dockerfiles](https://ddev.readthedocs.io/en/stable/users/extend/customizing-images/#adding-extra-dockerfiles-for-webimage-and-dbimage) | ||
here, but also [check `webimage_extra_packages` and `dbimage_extra_packages` in your | ||
`config.yaml`for more details](https://ddev.readthedocs.io/en/stable/users/extend/customizing-images/#adding-extra-debian-packages-with-webimage_extra_packages-and-dbimage_extra_packages)). | ||
|
||
## Case study: Manually Downgrading Terminus | ||
|
||
[Terminus](https://github.com/pantheon-systems/terminus/releases) dropped | ||
support for PHP 8.1 in recent versions, but some of our | ||
projects still use PHP 8.1. We had to downgrade the DDEV-bundled version of `terminus` for those | ||
projects by using a custom Dockerfile: | ||
|
||
```dockerfile | ||
# .ddev/web-build/Dockerfile.terminus | ||
# Terminus 4 drops support for PHP 8.1 which we still need | ||
ARG TERMINUS_VERSION="3.6.2" | ||
RUN curl -L --fail -o /usr/local/bin/terminus https://github.com/pantheon-systems/terminus/releases/download/${TERMINUS_VERSION}/terminus.phar && chmod +x /usr/local/bin/terminus | ||
``` | ||
|
||
`terminus` is just an example here, it could be any command you wish, | ||
[either because you are running an older PHP version](https://github.com/pantheon-systems/terminus/releases/tag/4.0.0) | ||
or the bundled version [has a bug that ruins things for you](https://github.com/platformsh/cli/discussions/166). | ||
|
||
## Installing custom tools | ||
|
||
You can obviously use the same techniques to install a variety of custom tools: | ||
|
||
```dockerfile | ||
# .ddev/web-build/Dockerfile.fzf | ||
# fooscript relies on fzf | ||
bserem marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# fooscript lists all your Pantheon projects using a fuzzy finder list | ||
ARG FZF_VERSION="0.62.0" | ||
RUN curl -s -L https://github.com/junegunn/fzf/releases/download/v${FZF_VERSION}/fzf-${FZF_VERSION}-linux_amd64.tar.gz | tar xvz -C /usr/local/bin/ && chmod +x /usr/local/bin/fzf | ||
``` | ||
bserem marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Resources | ||
bserem marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- [DDEV Pantheon integration documentation](https://ddev.readthedocs.io/en/stable/users/providers/pantheon/) | ||
- [Adding extra Dockerfiles for `webimage` and `dbimage`](https://ddev.readthedocs.io/en/stable/users/extend/customizing-images/#adding-extra-dockerfiles-for-webimage-and-dbimage) | ||
- [Adding extra Debian packages in DDEV](https://ddev.readthedocs.io/en/stable/users/extend/customizing-images/#adding-extra-debian-packages-with-webimage_extra_packages-and-dbimage_extra_packages) | ||
- [Customizing DDEV images with a custom Dockerfile](https://ddev.com/blog/customizing-ddev-local-images-with-a-custom-dockerfile/) | ||
|
||
## Contribute to DDEV | ||
|
||
If you like DDEV then you are welcome to contribute! You can join the [Discord channel](/s/discord), | ||
create a new [DDEV Add-on](https://ddev.readthedocs.io/en/stable/users/extend/additional-services/), | ||
or blog about how you use DDEV in your daily workflow. | ||
We’re always happy to hear from you on any of our [support channels](https://ddev.readthedocs.io/en/stable/users/support/). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.