Skip to content

Commit acce6ad

Browse files
authored
Remove images with "drud" in them (#300)
1 parent c2230f8 commit acce6ad

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed
99.9 KB
Loading
-37 KB
Binary file not shown.

public/img/edit-docs.png

52.5 KB
Loading

public/img/pr.png

217 KB
Loading

src/content/blog/customizing-ddev-local-images-with-a-custom-dockerfile.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
---
22
title: "Customizing DDEV images with a custom Dockerfile"
33
pubDate: 2020-04-07
4-
modifiedDate: 2023-02-21
5-
modifiedComment: Prepended `.ddev/web-build/` to the `mailhog.conf` example, as the `ADD` directive must be project-root relative.
6-
summary: How you can use a custom Dockerfile to tailor DDEV’s images, complete with examples.
4+
modifiedDate: 2024-12-31
5+
modifiedComment: Updated obsolete content.
6+
summary: How to use a custom Dockerfile to tailor DDEV’s images, complete with examples.
77
author: Randy Fay
88
featureImage:
9-
src: /img/blog/2020/04/d8composer.png
9+
src: /img/blog/2020/04/Dockerfile.cron.png
1010
alt: Tightly-cropped screenshot of a Dockerfile in an IDE.
1111
shadow: true
1212
categories:
1313
- Guides
1414
---
1515

16-
Did you know that you can customize [DDEV](https://github.com/ddev/ddev) Docker images with some very simple changes?
16+
Did you know that you can customize [DDEV](https://github.com/ddev/ddev) Docker images with some very simple changes? See the [full docs](https://ddev.readthedocs.io/en/stable/users/extend/customizing-images/) but we'll give some examples here.
1717

1818
There are two major ways to customize your DDEV web image:
1919

20-
1. Add a Debian package into the image with `webimage_extra_packages` ([docs](https://ddev.readthedocs.io/en/stable/users/extend/customizing-images/#adding-extra-debian-packages-with-webimage%5Fextra%5Fpackages-and-dbimage%5Fextra%5Fpackages)).
20+
1. Add a Debian package into the image with `webimage_extra_packages` ([docs](https://ddev.readthedocs.io/en/stable/users/extend/customizing-images/#adding-extra-debian-packages-with-webimage_extra_packages-and-dbimage_extra_packages)).
2121
2. Add an “extension” Dockerfile with free-form instructions for adding onto the container ([docs](https://ddev.readthedocs.io/en/stable/users/extend/customizing-images/#adding-extra-dockerfiles-for-webimage-and-dbimage)).
2222

2323
You can use these together (add packages with `webimage_extra_packages` and also do more sophisticated things in a Dockerfile).
2424

2525
### `webimage_extra_packages` in `config.yaml`
2626

27-
The simplest thing to do is add new Debian packages. For example, add to the `.ddev/config.yaml`: `webimage_extra_packages: [redis-tools, php8.1-yaml]`, and the redis-tools and “php8.1-yaml packages will be installed in the web container. This little addition to the container happens once, and doesn’t slow down your `ddev start` after that.
27+
The simplest thing to do is add new Debian packages. For example, add to the `.ddev/config.yaml`: `webimage_extra_packages: [redis-tools, php${DDEV_PHP_VERSION}-yaml]`, and the `redis-tools` and `php${DDEV_PHP_VERSION}-yaml` (with your PHP version) packages will be installed in the web container. This little addition to the container happens once, and doesn’t slow down your `ddev start` after that.
2828

2929
### Simple npm install with custom Dockerfile
3030

3131
Sometimes, though, people need to do things that are more specific than changing Debian apt packages. For example, you might want to override a configuration file with a replacement, or you might want to use npm to install something that is not managed with Debian’s package system.
3232

33-
This kind of change can be done by creating a `.ddev/web-build/Dockerfile` (start by copying `.ddev/web-build/Dockerfile.example`).
33+
This kind of change can be done by creating a `.ddev/web-build/Dockerfile.*` (we'll use `Dockerfile.gulp-cli). Start by copying `.ddev/web-build/Dockerfile.example`.
3434

35-
So, for example, if you have a `.ddev/web-build/Dockerfile` with these contents:
35+
So, for example, if you have a `.ddev/web-build/Dockerfile.gulp-cli` with these contents:
3636

3737
```docker
3838
RUN npm install --global gulp-cli
@@ -51,13 +51,13 @@ If you want to add files or override configuration files, it’s easy enough to
5151
ADD .ddev/web-build/mailhog.conf /etc/supervisor/conf.d
5252
```
5353

54-
But you could use this same technique for so many things. Do you need to completely override the /etc/php/8.1/fpm/php-fpm.conf file? Do it. Do you need to completely revamp the entire nginx configuration directory? Now you can do it. You can also add scripts into the container or even Linux binaries. And you can check the whole thing into your project so that other members of your team automatically have it.
54+
But you could use this same technique for so many things. Do you need to completely override the /etc/php/8.4/fpm/php-fpm.conf file? Do it. Do you need to completely revamp the entire nginx configuration directory? You can do it. You can also add scripts into the container or even Linux binaries. And you can check the whole thing into your project so that other members of your team automatically have it.
5555

5656
### pip3 installs
5757

5858
The Python world uses [pip3](https://pip.pypa.io/en/stable/) to install packages, and you can do that too.
5959

60-
This [Stack Overflow answer](https://stackoverflow.com/a/60683558/215713) goes into the details, but this Dockerfile should be a start:
60+
This [Stack Overflow answer](https://stackoverflow.com/a/60683558/215713) goes into the details, but this Dockerfile.mycli should be a start:
6161

6262
```docker
6363
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confnew" --no-install-recommends --no-install-suggests python3-pip python3-setuptools
@@ -80,4 +80,4 @@ RUN cp /etc/php/7.1/mods-available/mcrypt.ini /etc/php/${DDEV_PHP_VERSION}/mods-
8080

8181
## Join the conversation!
8282

83-
We’d love to hear about your recipes! Discuss them in our [Discord channel](/s/discord), create a new [DDEV Add-on](https://ddev.readthedocs.io/en/stable/users/extend/additional-services/), or tweet, or blog about them and give us a holler when you do. And we’re always happy to hear from you on any of our [support channels](https://ddev.readthedocs.io/en/stable/users/support/).
83+
We’d love to hear about your recipes! Discuss them in our [Discord channel](/s/discord), create a new [DDEV Add-on](https://ddev.readthedocs.io/en/stable/users/extend/additional-services/), and let us know when you do, or blog about them and give us a holler when you do. And we’re always happy to hear from you on any of our [support channels](https://ddev.readthedocs.io/en/stable/users/support/).

src/pages/support-ddev.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const title = `Support DDEV`
5454

5555
<Image
5656
src="/img/pr.png"
57-
alt="Screenshot of GitHub PR #217, where @beeradb added new version notifications"
57+
alt="Screenshot of GitHub PR #6848, where @gitressa added database management examples"
5858
class="rounded-lg"
5959
width={600}
6060
height={400}

0 commit comments

Comments
 (0)