From b31dda134822f5657ce1f264aef86172f1e2a614 Mon Sep 17 00:00:00 2001 From: josegonzalez Date: Tue, 14 Mar 2023 07:35:27 -0400 Subject: [PATCH 1/2] docs: add a note about how running plugin:install does not apply for docker-based installs Refs #5739 --- docs/advanced-usage/plugin-management.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/advanced-usage/plugin-management.md b/docs/advanced-usage/plugin-management.md index 4c6fac652..1c1f6acb4 100644 --- a/docs/advanced-usage/plugin-management.md +++ b/docs/advanced-usage/plugin-management.md @@ -78,6 +78,8 @@ dokku plugin:installed postgres ### Installing a plugin +> Note: Plugins installed in this method within a [docker-based installation](/docs/getting-started/install/docker.md) of Dokku do not persist across installs. Please see the [plugin installation section](/docs/getting-started/install/docker.md#plugin-installation) of the docker-based installation docs for further details. + Installing a plugin is easy as well using the `plugin:install` command. This command will also trigger the `install` pluginhook on all existing plugins. The most common usage is to install a plugin from a url. This url may be any of the following: From 9f410a1a5a447238401cdc6e3e7b2bc384c54966 Mon Sep 17 00:00:00 2001 From: josegonzalez Date: Tue, 14 Mar 2023 07:38:40 -0400 Subject: [PATCH 2/2] docs: add a note about alternative method for plugin installation for docker-based installs --- docs/getting-started/install/docker.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/getting-started/install/docker.md b/docs/getting-started/install/docker.md index baec4f1a2..db8eff5d8 100644 --- a/docs/getting-started/install/docker.md +++ b/docs/getting-started/install/docker.md @@ -40,6 +40,8 @@ Other docker container options can also be used when running Dokku, though the s ## Plugin Installation +### On Dokku start + To install custom plugins, create a `plugin-list` file in the host's `/var/lib/dokku` directory. The plugins listed herein will be automatically installed by Dokku on container boot. This file should be the following format: ```yaml @@ -53,6 +55,16 @@ postgres: https://github.com/dokku/dokku-postgres.git redis: https://github.com/dokku/dokku-redis.git ``` +### Prior to Dokku start + +The alternative is to build a custom docker image via a custom Dockerfile. This Dockerfile can run any `plugin:install` command. Note that the version installed at that time will be the one that persists. Below is an example Dockerfile showing this method. + +```Dockerfile +FROM dokku/dokku:0.30.1 +RUN dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres +RUN dokku plugin:install https://github.com/dokku/dokku-redis.git redis +``` + ## SSH Key Management To initialize ssh-keys within the container, use `docker exec` to enter the container and run the appropriate ssh-keys commands.