mirror of
https://github.com/dokku/dokku.git
synced 2026-09-01 19:49:25 +02:00
# History ## 0.38.26 Install/update via the bootstrap script: ```shell wget -NP . https://dokku.com/install/v0.38.26/bootstrap.sh sudo DOKKU_TAG=v0.38.26 bash bootstrap.sh ``` ### Bug Fixes - #8906: @josegonzalez Match docker options by shell word when removing ### New Features - #8911: @josegonzalez Route wildcard domains through traefik on k3s - #8909: @josegonzalez Support manually managed cert issuers on k3s - #8903: @josegonzalez Support kernel sysctls on the k3s scheduler - #8856: @youdie006 Add pre-parsed port_mappings to ports:report json ### Refactors - #8863: @josegonzalez Move host-crontab generation into cron plugin ### Documentation - #8908: @josegonzalez Document --global on scheduler-k3s report and set - #8858: @bakatz Added instructions for restoring backups on different CPU architectures. ### Tests - #8893: @dependabot[bot] chore(deps): bump django from 5.2.16 to 5.2.17 in /tests/apps/dockerfile-release - #8891: @dependabot[bot] chore(deps-dev): bump heroku/heroku-buildpack-php from 293 to 294 in /tests/apps/php - #8877: @dependabot[bot] chore(deps): bump google.golang.org/grpc from 1.82.1 to 1.83.0 in /tests/apps/gogrpc - #8874: @dependabot[bot] chore(deps): bump sass from 1.101.7 to 1.102.0 in /tests/apps/multi - #8870: @dependabot[bot] chore(deps): bump sass from 1.101.6 to 1.101.7 in /tests/apps/multi - #8866: @dependabot[bot] chore(deps): bump sass from 1.101.3 to 1.101.6 in /tests/apps/multi - #8860: @dependabot[bot] chore(deps): bump setuptools from 78.1.1 to 83.0.0 in /tests/apps/dockerfile-release - #8859: @dependabot[bot] chore(deps): bump immutable from 5.1.5 to 5.1.9 in /tests/apps/multi - #8855: @dependabot[bot] chore(deps): bump sass from 1.101.0 to 1.101.3 in /tests/apps/multi - #8857: @dependabot[bot] chore(deps): bump body-parser from 2.2.1 to 2.3.0 in /tests/apps/checks-root - #8853: @dependabot[bot] chore(deps): bump python from 3.15.0b3-bookworm to 3.15.0b4-bookworm in /tests/apps/dockerfile-release ### Dependencies - #8905: @dependabot[bot] chore(deps): bump oras.land/oras-go/v2 from 2.6.1 to 2.6.2 in /plugins/scheduler-k3s - #8869: @dependabot[bot] chore(deps): bump github.com/mattn/go-isatty from 0.0.23 to 0.0.24 in /plugins/app-json - #8887: @dependabot[bot] chore(deps): bump github.com/kedacore/keda/v2 from 2.20.1 to 2.20.2 in /plugins/scheduler-k3s - #8883: @dokku-bot chore: bump docker-container-healthchecker to 0.16.0 - #8886: @dependabot[bot] chore(deps): update markdown requirement from <3.11,>=3.10.2 to >=3.10.3,<3.11 in /docs/_build - #8892: @dependabot[bot] chore(deps): bump traefik from v3.7.9 to v3.7.10 in /plugins/traefik-vhosts - #8885: @dokku-bot chore: bump dokku-update to 0.10.0 - #8884: @dokku-bot chore: bump procfile-util to 0.20.8 - #8882: @dokku-bot chore: bump docker-image-labeler to 0.10.0 - #8888: @dependabot[bot] chore(deps): bump github.com/traefik/traefik/v2 from 2.11.53 to 2.11.54 in /plugins/scheduler-k3s - #8900: @dokku-bot chore: bump gliderlabs-sigil to 0.12.1 - #8899: @dokku-bot chore: bump herokuish to 0.11.14 - #8898: @dokku-bot chore: bump netrc to 0.11.1 - #8897: @dokku-bot chore: bump dokku-event-listener to 0.20.1 - #8896: @dokku-bot chore: bump sshcommand to 0.20.2 - #8895: @dokku-bot chore: bump lambda-builder to 0.9.4 - #8894: @dokku-bot chore: bump plugn to 0.17.1 - #8876: @dependabot[bot] chore(deps): bump github.com/cert-manager/cert-manager from 1.21.0 to 1.21.1 in /plugins/scheduler-k3s - #8873: @dependabot[bot] chore(deps): bump traefik from v3.7.8 to v3.7.9 in /plugins/traefik-vhosts - #8872: @dependabot[bot] chore(deps): bump github.com/traefik/traefik/v2 from 2.11.52 to 2.11.53 in /plugins/scheduler-k3s - #8871: @dependabot[bot] chore(deps): bump k8s.io/kubernetes from 1.36.2 to 1.36.3 in /plugins/scheduler-k3s - #8868: @dependabot[bot] chore(deps): bump k8s.io/kubectl from 0.36.2 to 0.36.3 in /plugins/scheduler-k3s - #8867: @dependabot[bot] chore(deps): bump k8s.io/client-go from 0.36.2 to 0.36.3 in /plugins/scheduler-k3s - #8865: @dependabot[bot] chore(deps): bump github.com/fluxcd/pkg/kustomize from 1.38.0 to 1.39.0 in /plugins/scheduler-k3s - #8864: @dependabot[bot] chore(deps): bump soupsieve from 2.9 to 2.9.1 in /docs/_build - #8854: @dependabot[bot] chore(deps): bump python from 3.15.0b3-alpine to 3.15.0b4-alpine in /docs/_build - #8852: @dependabot[bot] chore(deps): bump soupsieve from 2.8.4 to 2.9 in /docs/_build - #8851: @dependabot[bot] chore(deps): bump mkdocs-material from 9.7.6 to 9.7.7 in /docs/_build - #8850: @dependabot[bot] chore(deps): bump actions/setup-python from 6 to 7 ### Other - #8907: @josegonzalez fix: migrate env files before reading deprecated vars - #8881: @josegonzalez Ignore minor and patch updates for github actions
149 lines
5.1 KiB
Markdown
149 lines
5.1 KiB
Markdown
# Docker Installation Notes
|
|
|
|
Pull the dokku/dokku image:
|
|
|
|
```shell
|
|
docker pull dokku/dokku:0.38.26
|
|
```
|
|
|
|
Next, run the image.
|
|
|
|
```shell
|
|
docker container run -d \
|
|
--env DOKKU_HOSTNAME=dokku.me \
|
|
--env DOKKU_HOST_ROOT=/var/lib/dokku/home/dokku \
|
|
--env DOKKU_LIB_HOST_ROOT=/var/lib/dokku/var/lib/dokku \
|
|
--name dokku \
|
|
--publish 3022:22 \
|
|
--publish 8080:80 \
|
|
--publish 8443:443 \
|
|
--volume /var/lib/dokku:/mnt/dokku \
|
|
--volume /var/run/docker.sock:/var/run/docker.sock \
|
|
dokku/dokku:0.38.26
|
|
```
|
|
|
|
Alternatively, you can use `docker-compose.yml`:
|
|
|
|
```yaml
|
|
services:
|
|
dokku:
|
|
image: dokku/dokku:0.38.26
|
|
container_name: dokku
|
|
network_mode: bridge
|
|
ports:
|
|
- "3022:22"
|
|
- "8080:80"
|
|
- "8443:443"
|
|
volumes:
|
|
- "/var/lib/dokku:/mnt/dokku"
|
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
|
environment:
|
|
DOKKU_HOSTNAME: dokku.me
|
|
DOKKU_HOST_ROOT: /var/lib/dokku/home/dokku
|
|
DOKKU_LIB_HOST_ROOT: /var/lib/dokku/var/lib/dokku
|
|
restart: unless-stopped
|
|
```
|
|
|
|
## Container readiness
|
|
|
|
The image ships with a Docker `HEALTHCHECK` that flips from `starting` to `healthy` once first-boot bootstrap is complete (skel restored, `plugin-list` plugins installed, core install triggers fired), nginx and sshd are accepting connections, and `dokku ps:restore` has finished. Until those conditions hold, the container is considered unhealthy and dependent services should not yet send traffic.
|
|
|
|
To check the current state from the host:
|
|
|
|
```shell
|
|
docker inspect --format='{{.State.Health.Status}}' dokku
|
|
```
|
|
|
|
Internally, the check is backed by a loopback-only HTTP endpoint:
|
|
|
|
```shell
|
|
docker exec dokku curl -fsS http://127.0.0.1:18080/_dokku/health
|
|
```
|
|
|
|
The endpoint binds to `127.0.0.1:18080` inside the container by design - it is not published to the host and does not interfere with user app vhosts on ports 80/443.
|
|
|
|
Compose dependents can gate on the healthcheck via `depends_on` with `condition: service_healthy`:
|
|
|
|
```yaml
|
|
services:
|
|
dokku:
|
|
image: dokku/dokku:0.38.26
|
|
# ...
|
|
bootstrap:
|
|
image: alpine:3.20
|
|
command: ["echo", "dokku is ready"]
|
|
depends_on:
|
|
dokku:
|
|
condition: service_healthy
|
|
```
|
|
|
|
Dokku is run in the following configuration:
|
|
|
|
- The global hostname is set to `dokku.me` on boot.
|
|
- The container name is dokku.
|
|
- Container SSH port 22 is exposed on the host as 3022.
|
|
- Container HTTP port 80 is exposed on the host as 8080.
|
|
- Container HTTPS port 443 is exposed on the host as 8443.
|
|
- Data within the container is stored on the host within the `/var/lib/dokku` directory.
|
|
- Image build cache is set to the data dir + `/home/dokku`.
|
|
- The docker socket is mounted into container.
|
|
|
|
Application repositories, plugin config, as well as plugin data are persisted to disk within the specified host directory for `/var/lib/dokku`.
|
|
|
|
Other docker container options can also be used when running Dokku, though the specific outcome will depend upon the specified options. For example, the Dokku container's nginx port can be bound to a specific host ip by specifying `--publish $HOST_IP:8080:80`, where `$HOST_IP` is the IP desired. Please see the [docker container run documentation](https://docs.docker.com/engine/reference/commandline/run/) for further explanation for various docker arguments.
|
|
|
|
## 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
|
|
plugin_name: repository_url
|
|
```
|
|
|
|
An example for installing the postgres and redis plugins follows:
|
|
|
|
```yaml
|
|
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, though the `install` trigger must be skipped via the `--skip-install-trigger`. 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.38.26
|
|
RUN dokku plugin:install https://github.com/dokku/dokku-postgres.git --skip-install-trigger
|
|
RUN dokku plugin:install https://github.com/dokku/dokku-redis.git --skip-install-trigger
|
|
```
|
|
|
|
## SSH Key Management
|
|
|
|
To initialize ssh-keys within the container, use `docker exec` to enter the container:
|
|
|
|
```shell
|
|
docker exec -it dokku bash
|
|
```
|
|
|
|
Next, run the appropriate ssh-keys commands:
|
|
|
|
```shell
|
|
echo "$CONTENTS_OF_YOUR_PUBLIC_SSH_KEY_HERE" | dokku ssh-keys:add KEY_NAME
|
|
```
|
|
|
|
Please see the [user management documentation](/docs/deployment/user-management.md) for more information.
|
|
|
|
## Pushing Applications
|
|
|
|
When exposing the Dokku container's SSH port (22) on 3022, something similar to the following will need to be setup within the user's `~/.ssh/config`:
|
|
|
|
```
|
|
Host dokku.docker
|
|
HostName 127.0.0.1
|
|
Port 3022
|
|
```
|
|
|
|
In the above example, the hostname `127.0.0.1` is being aliased to `dokku.docker`, while the port is being overridden to `3022`. All SSH commands - including git pushes - for the hostname `dokku.docker` will be transparently sent to `127.0.0.1:3022`.
|