-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
base: main
Are you sure you want to change the base?
Changes from all commits
542ad9d
4a6c554
a38a78a
2c475a3
d05a032
ac39393
3219764
b009d17
0585e74
1a8c583
2ddae22
ce3c1ba
05d9929
7c92d08
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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. |
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-12 | ||||||||||||||||||
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, `terminus` being one of them. | ||||||||||||||||||
Latest releases of `terminus` are not compatible with older PHP versions, | ||||||||||||||||||
thus there is a need to downgrade the package inside DDEV. | ||||||||||||||||||
Comment on lines
+20
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
This guide covers how and will also explain how to use the same technique to install | ||||||||||||||||||
custom tools too. | ||||||||||||||||||
Comment on lines
+23
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
bserem marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||
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 | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
[Terminus](https://github.com/pantheon-systems/terminus/releases) dropped | ||||||||||||||||||
support for PHP 8.1 in newer versions which we still rely on in some of our | ||||||||||||||||||
projects. We had to downgrade the DDEV bundled version of Terminus for those | ||||||||||||||||||
projects by using a custom Dockerfile: | ||||||||||||||||||
Comment on lines
+33
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
```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/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.