2019-05-13 03:40:07 -04:00
# Docker Installation Notes
Pull the dokku/dokku image:
```shell
2019-06-10 17:02:49 -04:00
docker pull dokku/dokku:v0.17.7
2019-05-13 03:40:07 -04:00
```
Next, run the image.
```shell
docker run \
--env DOKKU_HOSTNAME=dokku.me \
--name dokku \
--publish 3022:22 \
--publish 8080:80 \
--publish 8443:443 \
2019-06-10 17:42:37 -04:00
--volume /var/lib/dokku:/mnt/dokku \
2019-05-13 03:40:07 -04:00
--volume /var/run/docker.sock:/var/run/docker.sock \
2019-06-10 17:02:49 -04:00
dokku/dokku:v0.17.7
2019-05-13 03:40:07 -04:00
```
Dokku is run with the following options:
- The global hostname is set to `dokku.me` on boot.
- The container name is dokku.
2019-06-10 17:02:49 -04:00
- Container SSH port 22 is exposed on the host as 3022.
- Container HTTP port 80 is exposed on the host as 8000.
- Container HTTPS port 443 is exposed on the host as 8443.
2019-06-10 17:42:37 -04:00
- Data within the container is stored on the host within the `/var/lib/dokku` directory.
2019-05-13 03:40:07 -04:00
- The docker socket is mounted into container
2019-06-10 17:42:37 -04:00
Application repositories, plugin config, and plugin data is persisted to disk within the specified host directory for `/var/lib/dokku` .
2019-05-13 03:40:07 -04:00
2019-06-10 17:42:37 -04:00
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:
2019-05-13 03:40:07 -04:00
2019-06-10 17:02:49 -04:00
```yaml
2019-05-13 03:40:07 -04:00
plugin_name: repository_url
```
An example for installing the postgres and redis plugins follows:
2019-06-10 17:02:49 -04:00
```yaml
2019-05-13 03:40:07 -04:00
postgres: https://github.com/dokku/dokku-postgres.git
redis: https://github.com/dokku/dokku-redis.git
```
2019-06-10 17:02:49 -04:00
To initialize ssh-keys within the container, use `docker exec` to enter the container and run the appropriate ssh-keys commands.
```shell
docker exec -it dokku bash
```
Please see the [user management documentation ](/docs/deployment/user-management.md ) for more information.