Compare commits

...

32 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
161380d639 Release 0.17.8
# History

## 0.17.8

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.8/bootstrap.sh
sudo DOKKU_TAG=v0.17.8 bash bootstrap.sh
```

### Bug Fixes

- #3591: @palfrey Allow SSH keys with no ending newline

### New Features

- #3587: @josegonzalez feat: drop make and gcc as dependencies
2019-06-14 12:59:57 -05:00
Jose Diaz-Gonzalez
5f36b138fb Merge pull request #3591 from palfrey/3590-ssh-key-without-newlines
Allow SSH keys with no ending newline
2019-06-14 12:59:02 -05:00
Tom Parker-Shemilt
024fd958e8 Add no-newline SSH key test 2019-06-12 22:30:26 +01:00
Tom Parker-Shemilt
a848d92823 Allow SSH keys with no ending newline (fixes #3590) 2019-06-12 22:16:02 +01:00
Jose Diaz-Gonzalez
3696757e8f Merge pull request #3587 from dokku/drop-unused-deps
feat: drop make and gcc as dependencies
2019-06-10 18:08:16 -04:00
Jose Diaz-Gonzalez
2cabf0a21f feat: drop make and gcc as dependencies
They aren't actually used within Dokku.
2019-06-10 16:25:41 -04:00
Jose Diaz-Gonzalez
283ff056da Release 0.17.7
# History

## 0.17.7

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.7/bootstrap.sh
sudo DOKKU_TAG=v0.17.7 bash bootstrap.sh
```

### New Features

- #3586: @josegonzalez ps plugin parallel usage cleanup

### Documentation

- #3584: @josegonzalez Fix no-install-recommends documentation

### Other

- #3579: @znz Update plugin list
2019-06-10 16:06:24 -04:00
Jose Diaz-Gonzalez
9bcd81c8bd Merge pull request #3586 from dokku/parallel-cleanup
ps plugin parallel usage cleanup
2019-06-10 14:10:29 -04:00
Jose Diaz-Gonzalez
0ebb400d91 feat: allow users to specify custom parallel arguments 2019-06-10 13:07:23 -04:00
Jose Diaz-Gonzalez
fc5544ac70 refactor: use a single method for running the ps:*all commands
This reduces the duplication at the cost of slightly more complexity.
2019-06-10 13:05:57 -04:00
Jose Diaz-Gonzalez
4a7f13c3d8 Merge pull request #3584 from dokku/josegonzalez-patch-1
Fix no-install-recommends documentation
2019-06-09 17:03:22 +02:00
Jose Diaz-Gonzalez
737e4a5bf4 docs: fix no-install-recommends documentation
[ci skip]
2019-06-09 11:02:46 -04:00
Jose Diaz-Gonzalez
d047db108b Merge pull request #3579 from znz/update-plugin-list
Update plugin list
2019-06-04 10:05:20 -05:00
Kazuhiro NISHIYAMA
73f5fde99d Update output of plugin:list 2019-06-04 07:48:57 +09:00
Kazuhiro NISHIYAMA
a17ed7981e Use plugin:list instead of deprecated plugin 2019-06-04 07:48:45 +09:00
Jose Diaz-Gonzalez
8a5504574d Release 0.17.6
# History

## 0.17.6

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.6/bootstrap.sh
sudo DOKKU_TAG=v0.17.6 bash bootstrap.sh
```

### New Features

- #3578: @josegonzalez Allow omitting resource args by setting DOKKU_OMIT_RESOURCE_ARGS
2019-05-30 17:40:21 -04:00
Jose Diaz-Gonzalez
8ac35766f3 Merge pull request #3578 from dokku/allow-omit-resource-args
Allow omitting resource args by setting DOKKU_OMIT_RESOURCE_ARGS
2019-05-30 17:00:02 -04:00
Jose Diaz-Gonzalez
5fd5e235d8 feat: allow omitting resource args by setting DOKKU_OMIT_RESOURCE_ARGS
This is useful for one-off containers that should have full-access to server resources.
2019-05-30 13:24:11 -04:00
Jose Diaz-Gonzalez
8d526b964b Release 0.17.5
# History

## 0.17.5

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.5/bootstrap.sh
sudo DOKKU_TAG=v0.17.5 bash bootstrap.sh
```

### New Features

- #3576: @josegonzalez Allow setting DOCKER_BIN path for docker execution
2019-05-29 01:28:50 -04:00
Jose Diaz-Gonzalez
084906d684 Merge pull request #3576 from dokku/docker-bin
Allow setting DOCKER_BIN path for docker execution
2019-05-29 01:27:18 -04:00
Jose Diaz-Gonzalez
79d4f4578d fix: use correct method for executing dokku within tests 2019-05-29 00:46:56 -04:00
Jose Diaz-Gonzalez
785d9b4937 feat: allow setting DOCKER_BIN path for docker execution
This change allows operators to specify a DOCKER_BIN environment variable. This will specify a binary to run when executing docker, which is useful in cases where the 'docker' command being run must be modified in a way that would otherwise be invasive to Dokku, but minimalistic if done within a wrapper.
2019-05-29 00:46:19 -04:00
Jose Diaz-Gonzalez
0e03c82139 Release 0.17.4
# History

## 0.17.4

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.4/bootstrap.sh
sudo DOKKU_TAG=v0.17.4 bash bootstrap.sh
```

### New Features

- #3575: @josegonzalez Add a way to cleanup apps for specific schedulers
2019-05-28 17:22:06 -04:00
Jose Diaz-Gonzalez
84e33f2c57 Merge pull request #3575 from dokku/scheduler-post-delete
Add a way to cleanup apps for specific schedulers
2019-05-28 17:21:36 -04:00
Jose Diaz-Gonzalez
a6408c0c56 feat: add a way to cleanup apps for specific schedulers
The post-delete hook will delete config, and thus scheduler-post-delete is the best place to actually delete resources where some local config may be necessary in order to reference resources.
2019-05-28 17:21:10 -04:00
Jose Diaz-Gonzalez
915ef6a8d5 Release 0.17.3
# History

## 0.17.3

Install/update via the bootstrap script:

```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.3/bootstrap.sh
sudo DOKKU_TAG=v0.17.3 bash bootstrap.sh
```

### Bug Fixes

- #3570: @znz Fix typos in trace help

### New Features

- #3574: @josegonzalez Add support for pulling app status from scheduler plugins
- #3571: @znz Simplify hostname_regex
2019-05-28 14:55:13 -04:00
Jose Diaz-Gonzalez
684f9fd175 Merge pull request #3574 from dokku/scheduler-app-status
Add support for pulling app status from scheduler plugins
2019-05-28 14:54:04 -04:00
Jose Diaz-Gonzalez
e276ebbc27 feat: add support for pulling app status from scheduler plugins
Previously, this was impossible to do if using an alternative scheduler.
2019-05-28 14:53:42 -04:00
Jose Diaz-Gonzalez
0988e62418 Merge pull request #3571 from znz/simplify-hostname_regex
Simplify hostname_regex
2019-05-24 18:01:14 -04:00
Jose Diaz-Gonzalez
bbc8c8a533 Merge pull request #3570 from znz/fix-typos
Fix typos in trace help
2019-05-23 11:51:31 -04:00
Kazuhiro NISHIYAMA
082e9458e5 Simplify hostname_regex
`[a-z0-9\.\*-]+` includes `\.` and `[a-z0-9\*-]+`.
So I think `^([a-z0-9\.\*-]+\.)*[a-z0-9\*-]+$` means last char is `[a-z0-9\*-]`
and other optional chars are `[a-z0-9\.\*-]*`.
2019-05-23 23:23:10 +09:00
Kazuhiro NISHIYAMA
0a17358352 Fix typos in trace help 2019-05-23 23:20:16 +09:00
92 changed files with 500 additions and 392 deletions

View File

@@ -1,5 +1,100 @@
# History
## 0.17.8
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.8/bootstrap.sh
sudo DOKKU_TAG=v0.17.8 bash bootstrap.sh
```
### Bug Fixes
- #3591: @palfrey Allow SSH keys with no ending newline
### New Features
- #3587: @josegonzalez feat: drop make and gcc as dependencies
## 0.17.7
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.7/bootstrap.sh
sudo DOKKU_TAG=v0.17.7 bash bootstrap.sh
```
### New Features
- #3586: @josegonzalez ps plugin parallel usage cleanup
### Documentation
- #3584: @josegonzalez Fix no-install-recommends documentation
### Other
- #3579: @znz Update plugin list
## 0.17.6
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.6/bootstrap.sh
sudo DOKKU_TAG=v0.17.6 bash bootstrap.sh
```
### New Features
- #3578: @josegonzalez Allow omitting resource args by setting DOKKU_OMIT_RESOURCE_ARGS
## 0.17.5
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.5/bootstrap.sh
sudo DOKKU_TAG=v0.17.5 bash bootstrap.sh
```
### New Features
- #3576: @josegonzalez Allow setting DOCKER_BIN path for docker execution
## 0.17.4
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.4/bootstrap.sh
sudo DOKKU_TAG=v0.17.4 bash bootstrap.sh
```
### New Features
- #3575: @josegonzalez Add a way to cleanup apps for specific schedulers
## 0.17.3
Install/update via the bootstrap script:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.3/bootstrap.sh
sudo DOKKU_TAG=v0.17.3 bash bootstrap.sh
```
### Bug Fixes
- #3570: @znz Fix typos in trace help
### New Features
- #3574: @josegonzalez Add support for pulling app status from scheduler plugins
- #3571: @znz Simplify hostname_regex
## 0.17.2
Install/update via the bootstrap script:

View File

@@ -98,8 +98,8 @@ A fresh VM running any of the following operating systems:
To install the latest stable release, run the following commands as a user who has access to `sudo`:
```shell
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.2/bootstrap.sh
sudo DOKKU_TAG=v0.17.2 bash bootstrap.sh
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.8/bootstrap.sh
sudo DOKKU_TAG=v0.17.8 bash bootstrap.sh
```
You can then proceed to the ip address or domain name associated with your server to complete the web-based installation.

View File

@@ -10,7 +10,7 @@ import subprocess
import sys
import threading
VERSION = 'v0.17.2'
VERSION = 'v0.17.8'
hostname = ''
try:

4
debian/control vendored
View File

@@ -1,9 +1,9 @@
Package: dokku
Version: 0.17.2
Version: 0.17.8
Section: web
Priority: optional
Architecture: amd64
Depends: locales, git, make, curl, gcc, man-db, netcat, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.7.1) | docker-engine (>= 1.7.1) | docker-io (>= 1.7.1) | docker.io (>= 1.7.1) | docker-ce | docker-ee, net-tools, software-properties-common, procfile-util, python-software-properties | python3-software-properties, rsyslog
Depends: locales, git, curl, man-db, netcat, sshcommand (>= 0.6.0), gliderlabs-sigil, docker-engine-cs (>= 1.7.1) | docker-engine (>= 1.7.1) | docker-io (>= 1.7.1) | docker.io (>= 1.7.1) | docker-ce | docker-ee, net-tools, software-properties-common, procfile-util, python-software-properties | python3-software-properties, rsyslog
Recommends: herokuish (>= 0.3.4), parallel, dokku-update
Pre-Depends: nginx (>= 1.8.0) | openresty, dnsutils, cgroupfs-mount | cgroup-lite, plugn (>= 0.3.0), sudo, python2.7, debconf
Maintainer: Jose Diaz-Gonzalez <dokku@josediazgonzalez.com>

View File

@@ -24,39 +24,43 @@ dokku plugins-install
## Usage
You can list all installed plugins using the `plugin` command:
You can list all installed plugins using the `plugin:list` command:
```shell
dokku plugin
dokku plugin:list
```
```
plugn: dev
00_dokku-standard 0.17.2 enabled dokku core standard plugin
20_events 0.17.2 enabled dokku core events logging plugin
apps 0.17.2 enabled dokku core apps plugin
build-env 0.17.2 enabled dokku core build-env plugin
certs 0.17.2 enabled dokku core certificate management plugin
checks 0.17.2 enabled dokku core checks plugin
common 0.17.2 enabled dokku core common plugin
config 0.17.2 enabled dokku core config plugin
docker-options 0.17.2 enabled dokku core docker-options plugin
domains 0.17.2 enabled dokku core domains plugin
enter 0.17.2 enabled dokku core enter plugin
git 0.17.2 enabled dokku core git plugin
logs 0.17.2 enabled dokku core logs plugin
named-containers 0.17.2 enabled dokku core named containers plugin
network 0.17.2 enabled dokku core network plugin
nginx-vhosts 0.17.2 enabled dokku core nginx-vhosts plugin
plugin 0.17.2 enabled dokku core plugin plugin
proxy 0.17.2 enabled dokku core proxy plugin
ps 0.17.2 enabled dokku core ps plugin
repo 0.17.2 enabled dokku core repo plugin
shell 0.17.2 enabled dokku core shell plugin
ssh-keys 0.17.2 enabled dokku core ssh-keys plugin
storage 0.17.2 enabled dokku core storage plugin
tags 0.17.2 enabled dokku core tags plugin
tar 0.17.2 enabled dokku core tar plugin
00_dokku-standard 0.17.8 enabled dokku core standard plugin
20_events 0.17.8 enabled dokku core events logging plugin
app-json 0.17.8 enabled dokku core app-json plugin
apps 0.17.8 enabled dokku core apps plugin
build-env 0.17.8 enabled dokku core build-env plugin
buildpacks 0.17.8 enabled dokku core buildpacks plugin
certs 0.17.8 enabled dokku core certificate management plugin
checks 0.17.8 enabled dokku core checks plugin
common 0.17.8 enabled dokku core common plugin
config 0.17.8 enabled dokku core config plugin
docker-options 0.17.8 enabled dokku core docker-options plugin
domains 0.17.8 enabled dokku core domains plugin
enter 0.17.8 enabled dokku core enter plugin
git 0.17.8 enabled dokku core git plugin
logs 0.17.8 enabled dokku core logs plugin
network 0.17.8 enabled dokku core network plugin
nginx-vhosts 0.17.8 enabled dokku core nginx-vhosts plugin
plugin 0.17.8 enabled dokku core plugin plugin
proxy 0.17.8 enabled dokku core proxy plugin
ps 0.17.8 enabled dokku core ps plugin
repo 0.17.8 enabled dokku core repo plugin
resource 0.17.8 enabled dokku core resource plugin
scheduler-docker-local 0.17.8 enabled dokku core scheduler-docker-local plugin
shell 0.17.8 enabled dokku core shell plugin
ssh-keys 0.17.8 enabled dokku core ssh-keys plugin
storage 0.17.8 enabled dokku core storage plugin
tags 0.17.8 enabled dokku core tags plugin
tar 0.17.8 enabled dokku core tar plugin
trace 0.17.8 enabled dokku core trace plugin
```
Installing a plugin is easy as well using the `plugin:install` command. This command will also trigger the `install` pluginhook on all existing plugins.

View File

@@ -2,10 +2,10 @@
<browserconfig>
<msapplication>
<tile>
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/mstile-310x150.png"/>
<square70x70logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/mstile-70x70.png"/>
<square150x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/mstile-150x150.png"/>
<square310x310logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/mstile-310x310.png"/>
<wide310x150logo src="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/mstile-310x150.png"/>
<TileColor>#da532c</TileColor>
</tile>
</msapplication>

View File

@@ -2,37 +2,37 @@
"name": "Dokku",
"icons": [
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.2\/docs\/assets\/favicons\/android-chrome-36x36.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.8\/docs\/assets\/favicons\/android-chrome-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.2\/docs\/assets\/favicons\/android-chrome-48x48.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.8\/docs\/assets\/favicons\/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.2\/docs\/assets\/favicons\/android-chrome-72x72.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.8\/docs\/assets\/favicons\/android-chrome-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.2\/docs\/assets\/favicons\/android-chrome-96x96.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.8\/docs\/assets\/favicons\/android-chrome-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.2\/docs\/assets\/favicons\/android-chrome-144x144.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.8\/docs\/assets\/favicons\/android-chrome-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.2\/docs\/assets\/favicons\/android-chrome-192x192.png",
"src": "https:\/\/cdn.jsdelivr.net\/dokku\/dokku@v0.17.8\/docs\/assets\/favicons\/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"

View File

@@ -39,13 +39,13 @@ h1 {
font-size: 1.6em;
}
.header .navbar-brand a {
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/dokku.png);
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/dokku.png);
text-indent: 40px;
}
.blurb {
color: #424242;
background-color: #ededed;
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/gplaypattern.png);
background-image: url(https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/gplaypattern.png);
padding: 45px 0;
text-align: center;
}

View File

@@ -14,6 +14,6 @@
"0.14.6",
"0.15.5",
"0.16.4",
"0.17.2"
"0.17.8"
]
}

View File

@@ -114,6 +114,7 @@ The following list config variables have special meaning and can be set in a var
| `DOKKU_DOCKERFILE_ENTRYPOINT` | dockerfile entrypoint | `dokku config:set` | |
| `DOKKU_DOCKERFILE_PORTS` | dockerfile ports | `dokku config:set` | |
| `DOKKU_DOCKERFILE_START_CMD` | none | `dokku config:set` | |
| `DOKKU_PARALLEL_ARGUMENTS`. | none | `dokku config:set` | Allows passing custom arguments to parallel for `ps:*all` commands |
| `DOKKU_PROXY_PORT` | automatically assigned | `dokku config:set` | |
| `DOKKU_PROXY_SSL_PORT` | automatically assigned | `dokku config:set` | |
| `DOKKU_PROXY_PORT_MAP` | automatically assigned | `dokku proxy:ports-add` <br /> `dokku proxy:ports-remove`, `dokku proxy:ports-clear` | |

View File

@@ -29,7 +29,7 @@ The workflow looks like this:
```shell
# having dokku-arch in ../dokku-arch
vagrant up build-arch
# wait for "==> build-arch: ==> Finished making: dokku 0.17.2-2 (Mon Feb 22 23:20:37 CET 2016)"
# wait for "==> build-arch: ==> Finished making: dokku 0.17.8-2 (Mon Feb 22 23:20:37 CET 2016)"
cd ../dokku-arch
git add PKGBUILD .SRCINFO
git commit -m 'Update to dokku 0.9.9'

View File

@@ -46,7 +46,7 @@ sudo BUILD_STACK=true STACK_URL=https://github.com/gliderlabs/herokuish.git make
## Skipping Herokuish installation
The Herokuish package is recommended but not required if not using Heroku buildpacks for deployment. Debian-based OS users can run the bootstrap installer via `sudo DOKKU_NO_INSTALL_RECOMMENDS=true bash bootstrap.sh` to skip the dependency. Please note that this will _also_ skip installation of other recommended dependencies.
The Herokuish package is recommended but not required if not using Heroku buildpacks for deployment. Debian-based OS users can run the bootstrap installer via `sudo DOKKU_NO_INSTALL_RECOMMENDS=" --no-install-recommends " bash bootstrap.sh` to skip the dependency. Please note that this will _also_ skip installation of other recommended dependencies.
## Configuring an unattended installation

View File

@@ -21,8 +21,8 @@ To install the latest stable version of Dokku, you can run the following shell c
```shell
# for debian systems, installs Dokku via apt-get
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.2/bootstrap.sh;
sudo DOKKU_TAG=v0.17.2 bash bootstrap.sh
wget https://raw.githubusercontent.com/dokku/dokku/v0.17.8/bootstrap.sh;
sudo DOKKU_TAG=v0.17.8 bash bootstrap.sh
```
The installation process takes about 5-10 minutes, depending upon internet connection speed.

View File

@@ -10,30 +10,30 @@
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Dokku">
<meta name="application-name" content="Dokku">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/style.css" rel="stylesheet">
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
<style>
.sponsors {
@@ -127,12 +127,12 @@
<p class="line">
<span class="path"></span>
<span class="prompt">$</span>
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.17.2/bootstrap.sh</span>
<span class="command">wget https://raw.githubusercontent.com/dokku/dokku/v0.17.8/bootstrap.sh</span>
</p>
<p class="line">
<span class="path"></span>
<span class="prompt">$</span>
<span class="command">sudo DOKKU_TAG=v0.17.2 bash bootstrap.sh</span>
<span class="command">sudo DOKKU_TAG=v0.17.8 bash bootstrap.sh</span>
</p>
<p class="line">
<span class="output">&nbsp;# go to your server's IP and follow the web installer</span>

View File

@@ -9,26 +9,26 @@
<meta name="author" content="">
<title>Dokku - The smallest PaaS implementation you've ever seen</title>
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="57x57" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/manifest.json">
<link rel="shortcut icon" href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Dokku">
<meta name="application-name" content="Dokku">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/favicons/browserconfig.xml">
<meta name="msapplication-TileImage" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script>
@@ -42,7 +42,7 @@
</script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.2/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.2/docs/assets/style.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/gh/dokku/dokku@v0.17.8/docs/assets/style.css" rel="stylesheet">
<!-- <link href="/dokku/docs/assets/style.css" rel="stylesheet"> -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<style>

5
dokku
View File

@@ -2,6 +2,7 @@
set -eo pipefail
shopt -s nullglob
export DOCKER_BIN=docker
if [[ -r /etc/default/dokku ]]; then
# shellcheck disable=SC1091
source /etc/default/dokku
@@ -36,6 +37,10 @@ DOKKU_DISTRO=$(
echo "$ID"
)
# Specify twice so that only host-level
# configuration can ever override the DOCKER_BIN value
export DOCKER_BIN=${DOCKER_BIN:="docker"}
export DOKKU_IMAGE=${DOKKU_IMAGE:="gliderlabs/herokuish:latest"}
export DOKKU_LIB_ROOT=${DOKKU_LIB_PATH:="/var/lib/dokku"}

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core standard plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -12,12 +12,12 @@ dokku_report_cmd() {
dokku_log_info1 "memory: "
free -m | sed "s/^/ /"
dokku_log_info1 "docker version: "
docker version | sed "s/^/ /"
"$DOCKER_BIN" version | sed "s/^/ /"
dokku_log_info1 "docker daemon info: "
docker -D info | sed "s/^/ /"
"$DOCKER_BIN" -D info | sed "s/^/ /"
dokku_log_info1 "sigil version: $(sigil -v)"
dokku_log_info1 "herokuish version: "
docker run --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
"$DOCKER_BIN" run --rm "$DOKKU_IMAGE" herokuish version | sed "s/^/ /"
dokku_log_info1 "dokku version: $(dokku version)"
dokku_log_info1 "dokku plugins: "
dokku plugin:list | sed "s/^/ /"

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core events logging plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -96,8 +96,8 @@ execute_script() {
DOKKU_APP_SHELL="$(config_get "$APP" DOKKU_APP_SHELL || echo "$DOKKU_APP_SHELL")"
[[ -z "$DOKKU_APP_SHELL" ]] && DOKKU_APP_SHELL="/bin/bash"
id=$(docker run "$DOKKU_GLOBAL_RUN_ARGS" -e DOKKU_TRACE="$DOKKU_TRACE" --label=dokku_phase_script="${PHASE_SCRIPT_KEY}" -d -v "$CACHE_HOST_DIR:/cache" "${ARG_ARRAY[@]}" "$IMAGE" "$DOKKU_APP_SHELL" -c "$COMMAND")
if test "$(docker wait "$id")" -ne 0; then
id=$("$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" -e DOKKU_TRACE="$DOKKU_TRACE" --label=dokku_phase_script="${PHASE_SCRIPT_KEY}" -d -v "$CACHE_HOST_DIR:/cache" "${ARG_ARRAY[@]}" "$IMAGE" "$DOKKU_APP_SHELL" -c "$COMMAND")
if test "$("$DOCKER_BIN" wait "$id")" -ne 0; then
dokku_container_log_verbose_quiet "$id"
dokku_log_fail "execution of '$SCRIPT_CMD' failed!"
fi
@@ -120,5 +120,5 @@ execute_script() {
fi
# shellcheck disable=SC2086
eval docker commit $DOCKER_COMMIT_ARGS "$id" "$IMAGE" >/dev/null
eval "$DOCKER_BIN" commit $DOCKER_COMMIT_ARGS "$id" "$IMAGE" >/dev/null
}

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core app-json plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -40,6 +40,7 @@ apps_destroy() {
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
local REMOVE_CONTAINERS="true"
plugn trigger scheduler-stop "$DOKKU_SCHEDULER" "$APP" "$REMOVE_CONTAINERS"
plugn trigger scheduler-post-delete "$DOKKU_SCHEDULER" "$APP" "$IMAGE_TAG"
plugn trigger post-delete "$APP" "$IMAGE_TAG"
}

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core apps plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -16,7 +16,7 @@ app_post_delete() {
fi
# shellcheck disable=SC2046
docker rmi $(docker images -q "$IMAGE_REPO" | xargs) &>/dev/null || true
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -q "$IMAGE_REPO" | xargs) &>/dev/null || true
}
app_post_delete "$@"

View File

@@ -18,7 +18,7 @@ apps_pre_delete() {
fi
if [[ -d $CACHE_DIR ]]; then
docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$CACHE_HOST_DIR:/cache" "$IMAGE" find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
"$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$CACHE_HOST_DIR:/cache" "$IMAGE" find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} \; || true
fi
}

View File

@@ -44,7 +44,7 @@ apps_clone_cmd() {
plugn trigger post-app-clone-setup "$OLD_APP" "$NEW_APP"
if [[ -d "$NEW_CACHE_DIR" ]] && ! rmdir "$NEW_CACHE_DIR"; then
docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$NEW_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
"$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$NEW_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
fi
rm -rf "$NEW_CACHE_DIR"

View File

@@ -16,7 +16,7 @@ apps_rename_cmd() {
local OLD_CACHE_HOST_DIR="$DOKKU_HOST_ROOT/$OLD_APP/cache"
if [[ -d "$OLD_CACHE_DIR" ]] && ! rmdir "$OLD_CACHE_DIR" >/dev/null 2>&1; then
docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$OLD_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
"$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$OLD_CACHE_HOST_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
fi
rm -rf "$OLD_CACHE_DIR"
apps_create "$NEW_APP"

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core build-env plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -19,14 +19,14 @@ build_env_pre_build_buildpack() {
dokku_log_info1 "Adding BUILD_ENV to build environment..."
# create build env files for use in buildpacks like this:
# https://github.com/niteoweb/heroku-buildpack-buildout/blob/5879fa3418f7d8e079f1aa5816ba1adde73f4948/bin/compile#L34
id=$(config_bundle --merged "$APP" | docker run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /tmp/env; cat | tar -x -C /tmp/env")
test "$(docker wait "$id")" -eq 0
docker commit "$id" "$IMAGE" >/dev/null
id=$(config_bundle --merged "$APP" | "$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /tmp/env; cat | tar -x -C /tmp/env")
test "$("$DOCKER_BIN" wait "$id")" -eq 0
"$DOCKER_BIN" commit "$id" "$IMAGE" >/dev/null
# create build env for 'old style' buildpacks and dokku plugins
id=$(config_export app "$APP" --format envfile --merged | docker run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "cat >> /app/.env")
test "$(docker wait "$id")" -eq 0
docker commit "$id" "$IMAGE" >/dev/null
id=$(config_export app "$APP" --format envfile --merged | "$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "cat >> /app/.env")
test "$("$DOCKER_BIN" wait "$id")" -eq 0
"$DOCKER_BIN" commit "$id" "$IMAGE" >/dev/null
}
build_env_pre_build_buildpack "$@"

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core buildpacks plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core certificate management plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core checks plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -136,7 +136,7 @@ func DirectoryExists(filePath string) bool {
// DockerInspect runs an inspect command with a given format against a container id
func DockerInspect(containerID, format string) (output string, err error) {
b, err := sh.Command("docker", "inspect", "--format", format, containerID).Output()
b, err := sh.Command(DockerBin(), "inspect", "--format", format, containerID).Output()
if err != nil {
return "", err
}
@@ -253,7 +253,7 @@ func IsImageHerokuishBased(image string) bool {
}
dockerGlobalArgs := os.Getenv("DOKKU_GLOBAL_RUN_ARGS")
parts := []string{"docker", "run", dockerGlobalArgs, "--entrypoint=\"/bin/sh\"", dockerArgs, image, "-c", "\"test -f /exec\""}
parts := []string{DockerBin(), "run", dockerGlobalArgs, "--entrypoint=\"/bin/sh\"", dockerArgs, image, "-c", "\"test -f /exec\""}
var dockerCmdParts []string
for _, str := range parts {
@@ -339,11 +339,21 @@ func VerifyAppName(appName string) (err error) {
// VerifyImage returns true if docker image exists in local repo
func VerifyImage(image string) bool {
imageCmd := NewShellCmd(strings.Join([]string{"docker inspect", image}, " "))
imageCmd := NewShellCmd(strings.Join([]string{DockerBin(), "inspect", image}, " "))
imageCmd.ShowOutput = false
return imageCmd.Execute()
}
// DockerBin returns a string which contains a path to the current docker binary
func DockerBin() string {
dockerBin := os.Getenv("DOCKER_BIN")
if dockerBin == "" {
dockerBin = "docker"
}
return dockerBin
}
//PlugnTrigger fire the given plugn trigger with the given args
func PlugnTrigger(triggerName string, args ...string) error {
shellArgs := make([]interface{}, len(args)+2)

View File

@@ -171,7 +171,7 @@ dokku_container_log_verbose_quiet() {
OIFS=$IFS
IFS=$'\n'
local line
for line in $(docker logs "$CID" 2>&1); do
for line in $("$DOCKER_BIN" logs "$CID" 2>&1); do
dokku_log_verbose_quiet "$line"
done
IFS=$OIFS
@@ -203,7 +203,7 @@ verify_app_name() {
verify_image() {
declare desc="verify image existence"
local IMAGE="$1"
if (docker inspect "$IMAGE" &>/dev/null); then
if "$DOCKER_BIN" inspect "$IMAGE" &>/dev/null; then
return 0
else
return 1
@@ -282,7 +282,7 @@ get_running_image_tag() {
verify_app_name "$APP"
local CIDS=($(get_app_container_ids "$APP"))
local RUNNING_IMAGE_TAG=$(docker inspect -f '{{ .Config.Image }}' "${CIDS[0]}" 2>/dev/null | awk -F: '{ print $2 }' || echo '')
local RUNNING_IMAGE_TAG=$("$DOCKER_BIN" inspect -f '{{ .Config.Image }}' "${CIDS[0]}" 2>/dev/null | awk -F: '{ print $2 }' || echo '')
echo "$RUNNING_IMAGE_TAG"
}
@@ -296,13 +296,13 @@ is_image_herokuish_based() {
fi
# due to how the build process works, all herokuish images have the Environment variable USER=herokuishuser
USER_VALUE="$(docker inspect -f '{{range .Config.Env}}{{if eq . "USER=herokuishuser" }}{{println .}}{{end}}{{end}}' "$IMAGE")"
USER_VALUE="$("$DOCKER_BIN" inspect -f '{{range .Config.Env}}{{if eq . "USER=herokuishuser" }}{{println .}}{{end}}{{end}}' "$IMAGE")"
[[ "$USER_VALUE" == "" ]] && return 1
return 0
}
get_docker_version() {
CLIENT_VERSION_STRING="$(docker version -f="{{ .Client.Version }}")"
CLIENT_VERSION_STRING="$("$DOCKER_BIN" version -f="{{ .Client.Version }}")"
echo "$CLIENT_VERSION_STRING"
}
@@ -376,19 +376,19 @@ copy_from_image() {
if is_image_herokuish_based "$IMAGE"; then
WORKDIR="/app"
else
WORKDIR="$(docker inspect -f '{{.Config.WorkingDir}}' "$IMAGE")"
WORKDIR="$("$DOCKER_BIN" inspect -f '{{.Config.WorkingDir}}' "$IMAGE")"
fi
if [[ -n "$WORKDIR" ]]; then
SRC_FILE="${WORKDIR}/${SRC_FILE}"
fi
fi
local CID=$(docker create "$DOKKU_GLOBAL_RUN_ARGS" "$IMAGE")
if ! docker cp "$CID:$SRC_FILE" "$DST_DIR"; then
docker rm -f "$CID" &>/dev/null
local CID=$("$DOCKER_BIN" create "$DOKKU_GLOBAL_RUN_ARGS" "$IMAGE")
if ! "$DOCKER_BIN" cp "$CID:$SRC_FILE" "$DST_DIR"; then
"$DOCKER_BIN" rm -f "$CID" &>/dev/null
return 1
fi
docker rm -f "$CID" &>/dev/null
"$DOCKER_BIN" rm -f "$CID" &>/dev/null
else
return 1
fi
@@ -470,7 +470,7 @@ is_container_running() {
local CONTAINER_STATUS
dokku_log_warn "Deprecated: common#is_container_status"
CONTAINER_STATUS=$(docker inspect -f '{{.State.Running}}' "$CID" || true)
CONTAINER_STATUS=$("$DOCKER_BIN" inspect -f '{{.State.Running}}' "$CID" || true)
if [[ "$CONTAINER_STATUS" == "true" ]]; then
return 0
@@ -483,7 +483,7 @@ is_container_status() {
declare desc="return 0 if given docker container id is in given state"
local CID=$1
local TEMPLATE="{{.State.$2}}"
local CONTAINER_STATUS=$(docker inspect -f "$TEMPLATE" "$CID" 2>/dev/null || true)
local CONTAINER_STATUS=$("$DOCKER_BIN" inspect -f "$TEMPLATE" "$CID" 2>/dev/null || true)
if [[ "$CONTAINER_STATUS" == "true" ]]; then
return 0
@@ -529,9 +529,9 @@ dokku_build() {
case "$IMAGE_SOURCE_TYPE" in
herokuish)
DOKKU_IMAGE="$(config_get "$APP" DOKKU_IMAGE || echo "$DOKKU_IMAGE")"
cid=$(tar -c . | docker run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$DOKKU_IMAGE" /bin/bash -c "mkdir -p /app && tar -xC /app")
test "$(docker wait "$cid")" -eq 0
docker commit "$cid" "$IMAGE" >/dev/null
cid=$(tar -c . | "$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$DOKKU_IMAGE" /bin/bash -c "mkdir -p /app && tar -xC /app")
test "$("$DOCKER_BIN" wait "$cid")" -eq 0
"$DOCKER_BIN" commit "$cid" "$IMAGE" >/dev/null
[[ -d $DOKKU_APP_CACHE_DIR ]] || mkdir -p "$DOKKU_APP_CACHE_DIR"
plugn trigger pre-build-buildpack "$APP"
@@ -543,10 +543,10 @@ dokku_build() {
declare -a ARG_ARRAY
eval "ARG_ARRAY=($DOCKER_ARGS)"
# shellcheck disable=SC2086
cid=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d -v $DOKKU_APP_HOST_CACHE_DIR:/cache -e CACHE_PATH=/cache "${ARG_ARRAY[@]}" $IMAGE /build)
docker attach "$cid"
test "$(docker wait "$cid")" -eq 0
docker commit "$cid" "$IMAGE" >/dev/null
cid=$("$DOCKER_BIN" run $DOKKU_GLOBAL_RUN_ARGS -d -v $DOKKU_APP_HOST_CACHE_DIR:/cache -e CACHE_PATH=/cache "${ARG_ARRAY[@]}" $IMAGE /build)
"$DOCKER_BIN" attach "$cid"
test "$("$DOCKER_BIN" wait "$cid")" -eq 0
"$DOCKER_BIN" commit "$cid" "$IMAGE" >/dev/null
plugn trigger post-build-buildpack "$APP"
;;
@@ -574,7 +574,7 @@ dokku_build() {
eval "ARG_ARRAY=($DOCKER_ARGS)"
# shellcheck disable=SC2086
docker build "${ARG_ARRAY[@]}" $DOKKU_DOCKER_BUILD_OPTS -t $IMAGE .
"$DOCKER_BIN" build "${ARG_ARRAY[@]}" $DOKKU_DOCKER_BUILD_OPTS -t $IMAGE .
plugn trigger post-build-dockerfile "$APP"
;;
@@ -600,14 +600,14 @@ dokku_release() {
herokuish)
plugn trigger pre-release-buildpack "$APP" "$IMAGE_TAG"
if [[ -n $(config_export global) ]]; then
cid=$(config_export global | docker run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/00-global-env.sh")
test "$(docker wait "$cid")" -eq 0
docker commit "$cid" "$IMAGE" >/dev/null
cid=$(config_export global | "$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/00-global-env.sh")
test "$("$DOCKER_BIN" wait "$cid")" -eq 0
"$DOCKER_BIN" commit "$cid" "$IMAGE" >/dev/null
fi
if [[ -n $(config_export app "$APP") ]]; then
cid=$(config_export app "$APP" | docker run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/01-app-env.sh")
test "$(docker wait "$cid")" -eq 0
docker commit "$cid" "$IMAGE" >/dev/null
cid=$(config_export app "$APP" | "$DOCKER_BIN" run "$DOKKU_GLOBAL_RUN_ARGS" -i -a stdin "$IMAGE" /bin/bash -c "mkdir -p /app/.profile.d && cat > /app/.profile.d/01-app-env.sh")
test "$("$DOCKER_BIN" wait "$cid")" -eq 0
"$DOCKER_BIN" commit "$cid" "$IMAGE" >/dev/null
fi
plugn trigger post-release-buildpack "$APP" "$IMAGE_TAG"
;;
@@ -713,15 +713,15 @@ docker_cleanup() {
# delete all non-running containers
# shellcheck disable=SC2046
docker rm $(docker ps -a -f "status=exited" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
"$DOCKER_BIN" rm $("$DOCKER_BIN" ps -a -f "status=exited" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
# delete all dead containers
# shellcheck disable=SC2046
docker rm $(docker ps -a -f "status=dead" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
"$DOCKER_BIN" rm $("$DOCKER_BIN" ps -a -f "status=dead" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
# delete unused images
# shellcheck disable=SC2046
docker rmi $(docker images -f 'dangling=true' -q) &>/dev/null &
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -f 'dangling=true' -q) &>/dev/null &
}
get_available_port() {
@@ -797,7 +797,7 @@ get_exposed_ports_from_image() {
local IMAGE="$1"
verify_image "$IMAGE"
# shellcheck disable=SC2016
local DOCKER_IMAGE_EXPOSED_PORTS="$(docker inspect -f '{{range $key, $value := .Config.ExposedPorts}}{{$key}} {{end}}' "$IMAGE")"
local DOCKER_IMAGE_EXPOSED_PORTS="$("$DOCKER_BIN" inspect -f '{{range $key, $value := .Config.ExposedPorts}}{{$key}} {{end}}' "$IMAGE")"
echo "$DOCKER_IMAGE_EXPOSED_PORTS"
}
@@ -805,7 +805,7 @@ get_entrypoint_from_image() {
declare desc="return .Config.Entrypoint from passed image name"
local IMAGE="$1"
verify_image "$IMAGE"
local DOCKER_IMAGE_ENTRYPOINT="$(docker inspect --format '{{range .Config.Entrypoint}}{{.}} {{end}}' "$IMAGE")"
local DOCKER_IMAGE_ENTRYPOINT="$("$DOCKER_BIN" inspect --format '{{range .Config.Entrypoint}}{{.}} {{end}}' "$IMAGE")"
echo "ENTRYPOINT $DOCKER_IMAGE_ENTRYPOINT"
}
@@ -813,7 +813,7 @@ get_cmd_from_image() {
declare desc="return .Config.Cmd from passed image name"
local IMAGE="$1"
verify_image "$IMAGE"
local DOCKER_IMAGE_CMD="$(docker inspect --format '{{range .Config.Cmd}}{{.}} {{end}}' "$IMAGE")"
local DOCKER_IMAGE_CMD="$("$DOCKER_BIN" inspect --format '{{range .Config.Cmd}}{{.}} {{end}}' "$IMAGE")"
DOCKER_IMAGE_CMD="${DOCKER_IMAGE_CMD/\/bin\/sh -c/}"
echo "CMD $DOCKER_IMAGE_CMD"
}
@@ -851,7 +851,7 @@ get_container_ports() {
local cid
for cid in $APP_CIDS; do
local container_ports="$(docker port "$cid" | awk '{ print $3 "->" $1}' | awk -F ":" '{ print $2 }')"
local container_ports="$("$DOCKER_BIN" port "$cid" | awk '{ print $3 "->" $1}' | awk -F ":" '{ print $2 }')"
done
echo "$container_ports"

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core common plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core config plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core docker-options plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -312,7 +312,7 @@ is_global_vhost_enabled() {
is_valid_hostname() {
declare desc="return 0 if argument is a valid hostname; else return 1"
local hostname_string="${1,,}"
local hostname_regex='^([a-z0-9\.\*-]+\.)*[a-z0-9\*-]+$'
local hostname_regex='^[a-z0-9\.\*-]*[a-z0-9\*-]$'
if [[ $hostname_string =~ $hostname_regex ]]; then
return 0
else

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core domains plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core enter plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -60,7 +60,7 @@ enter_default_cmd() {
has_tty && local DOKKU_RUN_OPTS+=" -i -t"
is_image_herokuish_based "$IMAGE" && local EXEC_CMD="/exec"
# shellcheck disable=SC2086
docker exec $DOKKU_RUN_OPTS $ID $EXEC_CMD "${@:-$DOKKU_APP_SHELL}"
"$DOCKER_BIN" exec $DOKKU_RUN_OPTS $ID $EXEC_CMD "${@:-$DOKKU_APP_SHELL}"
}
enter_default_cmd "$@"

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core git plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core logs plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -132,7 +132,7 @@ func GetContainerPort(appName, processType string, isHerokuishContainer bool, co
break
}
}
cmd := sh.Command("docker", "port", containerID, port)
cmd := sh.Command(common.DockerBin(), "port", containerID, port)
cmd.Stderr = ioutil.Discard
b, err := cmd.Output()
if err == nil {

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core network plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core nginx-vhosts plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core plugin plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core proxy plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -118,6 +118,13 @@ set_scale() {
done
}
ps_restore() {
declare desc="restores app"
local APP="$1"
ps_start "$APP"
}
ps_start() {
declare desc="starts app"
local APP="$1"
@@ -222,27 +229,9 @@ get_restart_policies() {
fn-ps-app-status() {
declare APP="$1"
local PROCS=0 RUNNING=""
local APP_CIDS=$(get_app_container_ids "$APP")
for CID in $APP_CIDS; do
if (is_container_status "$CID" "Running"); then
RUNNING+="0"
else
RUNNING+="1"
fi
PROCS=$((PROCS + 1))
done
if [[ "${#RUNNING}" -eq 0 ]] || [[ "${#RUNNING}" -ne 0 ]] && [[ "$RUNNING" != *"0"* ]]; then
RUNNING="false"
elif [[ "$RUNNING" != *"1"* ]] && [[ "${#RUNNING}" -ne 0 ]]; then
RUNNING="true"
else
RUNNING="mixed"
fi
echo "$PROCS $RUNNING"
local DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
plugn trigger scheduler-app-status "$DOKKU_SCHEDULER" "$APP"
}
fn-ps-is-app-running() {

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/docker-options/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
@@ -61,7 +62,7 @@ cmd-ps-report-single() {
local APP_CONTAINER_STATUS
for CONTAINER_FILE in $CONTAINER_FILES; do
CID=$(<"$DOKKU_ROOT/$APP/$CONTAINER_FILE")
APP_CONTAINER_STATUS=$(docker inspect -f '{{.State.Status}}' "$CID" 2>/dev/null || true)
APP_CONTAINER_STATUS=$("$DOCKER_BIN" inspect -f '{{.State.Status}}' "$CID" 2>/dev/null || true)
[[ -z "$APP_CONTAINER_STATUS" ]] && APP_CONTAINER_STATUS="missing"
STATUSES+=("${CONTAINER_FILE#*.}:$APP_CONTAINER_STATUS#${CID:0:12}")
done
@@ -117,3 +118,53 @@ cmd-ps-report-single() {
fi
fi
}
fn-ps-parallel-cmd() {
declare desc="Run a ps command against all apps"
declare CMD="$1"
local GNU_PARALLEL has_apps=false
for APP in $(dokku_apps); do
has_apps=true
break
done
if [[ "$has_apps" == "false" ]]; then
dokku_log_info1 "No apps detected"
return
fi
if which parallel >/dev/null 2>&1; then
dokku_log_info1 "Running 'dokku ps:${CMD}' in parallel"
GNU_PARALLEL=$(parallel -V 2>&1 | grep GNU || true)
if [[ -z "$GNU_PARALLEL" ]]; then
# shellcheck disable=SC2046
parallel $DOKKU_PARALLEL_ARGUMENTS -i bash -c "dokku ps:${CMD} {}" -- $(dokku_apps)
else
# shellcheck disable=SC2046
dokku_apps | parallel $DOKKU_PARALLEL_ARGUMENTS "dokku ps:${CMD} {}"
fi
return
fi
dokku_log_info1 "Running 'dokku ps:${CMD}' in serially"
for APP in $(dokku_apps); do
if ! (is_deployed "$APP"); then
dokku_log_warn "App $APP has not been deployed"
continue
fi
if [[ "$CMD" == "restore" ]]; then
local DOKKU_APP_RESTORE=$(config_get "$APP" DOKKU_APP_RESTORE || true)
if [[ "$DOKKU_APP_RESTORE" == 0 ]]; then
continue
fi
fi
dokku_log_verbose "Running 'dokku ps:${CMD} $APP' ..."
if ps_${CMD} "$APP"; then
continue
fi
dokku_log_warn "dokku ps:${CMD} $APP failed"
done
}

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core ps plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -21,7 +21,7 @@ ps_main_cmd() {
has_tty && local DOKKU_RUN_OPTS="-i -t"
dokku_log_info1_quiet "running processes in container: $CID"
# shellcheck disable=SC2086
docker exec $DOKKU_RUN_OPTS $CID /bin/sh -c "ps auxwww"
"$DOCKER_BIN" exec $DOKKU_RUN_OPTS $CID /bin/sh -c "ps auxwww"
done
}

View File

@@ -2,38 +2,13 @@
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions"
ps_rebuildall_cmd() {
declare desc="rebuilds all apps from source"
local cmd="ps:rebuildall"
local GNU_PARALLEL
if which parallel >/dev/null 2>&1; then
dokku_log_info1 "Rebuilding in parallel"
GNU_PARALLEL=$(parallel -V 2>&1 | grep GNU || true)
if [[ -z "$GNU_PARALLEL" ]]; then
# shellcheck disable=SC2046
parallel -i bash -c "dokku ps:rebuild {}" -- $(dokku_apps)
else
dokku_apps | parallel 'dokku ps:rebuild {}'
fi
return
fi
for app in $(dokku_apps); do
if ! (is_deployed "$app"); then
dokku_log_warn "App $app has not been deployed"
continue
fi
dokku_log_verbose "Rebuilding app $app ..."
if ps_rebuild "$app"; then
continue
fi
dokku_log_warn "dokku ps:rebuild ${app} failed"
done
fn-ps-parallel-cmd "rebuild"
}
ps_rebuildall_cmd "$@"

View File

@@ -2,38 +2,13 @@
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions"
ps_restartall_cmd() {
declare desc="restarts all apps via command line"
local cmd="ps:restartall"
local GNU_PARALLEL
if which parallel >/dev/null 2>&1; then
dokku_log_info1 "Restarting in parallel"
GNU_PARALLEL=$(parallel -V 2>&1 | grep GNU || true)
if [[ -z "$GNU_PARALLEL" ]]; then
# shellcheck disable=SC2046
parallel -i bash -c "dokku ps:restart {}" -- $(dokku_apps)
else
dokku_apps | parallel 'dokku ps:restart {}'
fi
return
fi
for app in $(dokku_apps); do
if ! (is_deployed "$app"); then
dokku_log_warn "App $app has not been deployed"
continue
fi
dokku_log_verbose "Restarting app $app ..."
if ps_restart "$app"; then
continue
fi
dokku_log_warn "dokku ps:restart ${app} failed"
done
fn-ps-parallel-cmd "restart"
}
ps_restartall_cmd "$@"

View File

@@ -4,6 +4,7 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions"
ps_restore_cmd() {
declare desc="starts all apps with DOKKU_APP_RESTORE not set to 0 via command line"
@@ -12,7 +13,7 @@ ps_restore_cmd() {
local DOKKU_SCHEDULER
DOKKU_SCHEDULER=$(get_app_scheduler "$APP")
plugn trigger pre-restore "$DOKKU_SCHEDULER"
plugn trigger pre-restore "$DOKKU_SCHEDULER" "$APP"
if [[ -n "$APP" ]]; then
if ! (is_deployed "$APP"); then
@@ -22,43 +23,11 @@ ps_restore_cmd() {
DOKKU_APP_RESTORE="$(config_get "$APP" DOKKU_APP_RESTORE || true)"
if [[ $DOKKU_APP_RESTORE != 0 ]]; then
ps_start "$APP" || dokku_log_warn "dokku ps:restore ${APP} failed"
ps_restore "$APP" || dokku_log_warn "dokku ps:restore ${APP} failed"
fi
else
ps_restore_all
fn-ps-parallel-cmd "restore"
fi
}
ps_restore_all() {
local GNU_PARALLEL
if which parallel >/dev/null 2>&1; then
dokku_log_info1 "Restarting in parallel"
GNU_PARALLEL=$(parallel -V 2>&1 | grep GNU || true)
if [[ -z "$GNU_PARALLEL" ]]; then
# shellcheck disable=SC2046
parallel -i bash -c "dokku ps:restore {}" -- $(dokku_apps)
else
dokku_apps | parallel 'dokku ps:restore {}'
fi
return
fi
for app in $(dokku_apps); do
if ! (is_deployed "$app"); then
dokku_log_warn "App $app has not been deployed"
continue
fi
local DOKKU_APP_RESTORE=$(config_get "$app" DOKKU_APP_RESTORE || true)
if [[ $DOKKU_APP_RESTORE != 0 ]]; then
dokku_log_verbose "Restoring app $app ..."
if ps_start "$app"; then
continue
fi
dokku_log_warn "dokku ps:restore ${app} failed"
fi
done
}
ps_restore_cmd "$@"

View File

@@ -2,38 +2,13 @@
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions"
ps_startall_cmd() {
declare desc="starts all apps via command line"
local cmd="ps:startall"
local GNU_PARALLEL
if which parallel >/dev/null 2>&1; then
dokku_log_info1 "Starting in parallel"
GNU_PARALLEL=$(parallel -V 2>&1 | grep GNU || true)
if [[ -z "$GNU_PARALLEL" ]]; then
# shellcheck disable=SC2046
parallel -i bash -c "dokku ps:start {}" -- $(dokku_apps)
else
dokku_apps | parallel 'dokku ps:start {}'
fi
return
fi
for app in $(dokku_apps); do
if ! (is_deployed "$app"); then
dokku_log_warn "App $app has not been deployed"
continue
fi
dokku_log_verbose "Starting app $app ..."
if ps_start "$app"; then
continue
fi
dokku_log_warn "dokku ps:start ${app} failed"
done
fn-ps-parallel-cmd "start"
}
ps_startall_cmd "$@"

View File

@@ -2,38 +2,13 @@
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions"
ps_stopall_cmd() {
declare desc="stops all apps via command line"
local cmd="ps:stopall"
local GNU_PARALLEL
if which parallel >/dev/null 2>&1; then
dokku_log_info1 "Stopping in parallel"
GNU_PARALLEL=$(parallel -V 2>&1 | grep GNU || true)
if [[ -z "$GNU_PARALLEL" ]]; then
# shellcheck disable=SC2046
parallel -i bash -c "dokku ps:stop {}" -- $(dokku_apps)
else
dokku_apps | parallel 'dokku ps:stop {}'
fi
return
fi
for app in $(dokku_apps); do
if ! (is_deployed "$app"); then
dokku_log_warn "App $app has not been deployed"
continue
fi
dokku_log_verbose "Stopping app $app ..."
if ps_stop "$app"; then
continue
fi
dokku_log_warn "dokku ps:stop ${app} failed"
done
fn-ps-parallel-cmd "stop"
}
ps_stopall_cmd "$@"

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core repo plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -25,7 +25,9 @@ func main() {
dokkuGlobalRunArgs := common.MustGetEnv("DOKKU_GLOBAL_RUN_ARGS")
image := common.GetDeployingAppImageName(appName, "", "")
if info, _ := os.Stat(cacheDir); info != nil && info.IsDir() {
purgeCacheCmd := common.NewShellCmd(strings.Join([]string{"docker run --rm", dokkuGlobalRunArgs,
purgeCacheCmd := common.NewShellCmd(strings.Join([]string{
common.DockerBin(),
"run --rm", dokkuGlobalRunArgs,
"-v", strings.Join([]string{cacheHostDir, ":/cache"}, ""), image,
`find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} ;`}, " "))
purgeCacheCmd.Execute()

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core resource plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -21,6 +21,11 @@ func main() {
appName := flag.Arg(0)
processType := flag.Arg(3)
if os.Getenv("DOKKU_OMIT_RESOURCE_ARGS") == "1" {
fmt.Print(string(stdin))
return
}
resources, err := common.PropertyGetAll("resource", appName)
if err != nil {
fmt.Print(string(stdin))

View File

@@ -85,7 +85,7 @@ scheduler-docker-local-check-deploy() {
# after successfully copying the file. Thus, we suppress stderr.
# ref: https://github.com/dotcloud/docker/issues/3986
local CHECK_DEPLOY_TMP_WORK_DIR=$(mktemp -d "/tmp/dokku-${FUNCNAME[0]}.XXXX")
docker cp "$DOKKU_APP_CONTAINER_ID:/app/CHECKS" "$CHECK_DEPLOY_TMP_WORK_DIR" 2>/dev/null || true
"$DOCKER_BIN" cp "$DOKKU_APP_CONTAINER_ID:/app/CHECKS" "$CHECK_DEPLOY_TMP_WORK_DIR" 2>/dev/null || true
local FILENAME=${CHECK_DEPLOY_TMP_WORK_DIR}/CHECKS
@@ -119,10 +119,10 @@ scheduler-docker-local-check-deploy() {
sleep "$DOKKU_DEFAULT_CHECKS_WAIT"
! (is_container_status "$DOKKU_APP_CONTAINER_ID" "Running") && dokku_log_fail "App container failed to start!!"
local container_restarts="$(docker inspect -f "{{ .RestartCount }}" "$DOKKU_APP_CONTAINER_ID")"
local container_restarts="$("$DOCKER_BIN" inspect -f "{{ .RestartCount }}" "$DOKKU_APP_CONTAINER_ID")"
if [[ $container_restarts -ne 0 ]]; then
docker container update --restart=no "$DOKKU_APP_CONTAINER_ID" &>/dev/null || true
docker stop "$DOKKU_APP_CONTAINER_ID" || true
"$DOCKER_BIN" container update --restart=no "$DOKKU_APP_CONTAINER_ID" &>/dev/null || true
"$DOCKER_BIN" stop "$DOKKU_APP_CONTAINER_ID" || true
dokku_log_fail "App container failed to start!!"
fi

View File

@@ -36,26 +36,26 @@ scheduler-docker-local-core-post-deploy() {
local NAME="$APP.$DYNO"
local CURRENT_CONTAINER_ID="$(<"$container")"
# TODO: Ensure these are from the current service
local PREVIOUS_CIDS=$(docker ps -a -q -f name="^.?$NAME\$" | xargs) || true
local PREVIOUS_CIDS=$("$DOCKER_BIN" ps -a -q -f name="^.?$NAME\$" | xargs) || true
if [[ -n $PREVIOUS_CIDS ]]; then
dokku_log_info1_quiet "Found previous container(s) ($PREVIOUS_CIDS) named $NAME"
# in case $PREVIOUS_CIDS has more than one entry
local cid
for cid in $PREVIOUS_CIDS; do
local PREVIOUS_CONTAINER_STATUS=$(docker inspect -f '{{.State.Status}}' "$cid" || echo "dead")
local PREVIOUS_CONTAINER_STATUS=$("$DOCKER_BIN" inspect -f '{{.State.Status}}' "$cid" || echo "dead")
# dead containers cannot be renamed
if [[ "$PREVIOUS_CONTAINER_STATUS" != "dead" ]]; then
local CONTAINER_DATE_NAME="$NAME.$(date +%s)"
dokku_log_info2_quiet "Renaming container ($cid) ${NAME} to $CONTAINER_DATE_NAME"
docker rename "$NAME" "$CONTAINER_DATE_NAME" >/dev/null 2>&1 || dokku_log_warn "Unable to rename container"
"$DOCKER_BIN" rename "$NAME" "$CONTAINER_DATE_NAME" >/dev/null 2>&1 || dokku_log_warn "Unable to rename container"
fi
done
fi
local ID=$(cat "$container")
local CURRENT_NAME=$(docker inspect -f '{{.Name}}' "$ID" | tr -d /)
local CURRENT_NAME=$("$DOCKER_BIN" inspect -f '{{.Name}}' "$ID" | tr -d /)
if [[ -n "$CURRENT_NAME" ]]; then
dokku_log_info2_quiet "Renaming container (${ID:0:12}) $CURRENT_NAME to $NAME"
docker rename "$CURRENT_NAME" "$NAME" >/dev/null
"$DOCKER_BIN" rename "$CURRENT_NAME" "$NAME" >/dev/null
fi
done
shopt -u nullglob

View File

@@ -95,7 +95,7 @@ fn-scheduler-docker-local-retire-container() {
declare APP="$1" CID="$2" DEAD_TIME="$3"
local STATE
STATE="$(docker inspect -f "{{ .State.Status }}" "$CID" 2>/dev/null || true)"
STATE="$("$DOCKER_BIN" inspect -f "{{ .State.Status }}" "$CID" 2>/dev/null || true)"
if [[ -z "$STATE" ]]; then
return
fi
@@ -104,7 +104,7 @@ fn-scheduler-docker-local-retire-container() {
[[ $DOKKU_DOCKER_STOP_TIMEOUT ]] && DOCKER_STOP_TIME_ARG="--time=${DOKKU_DOCKER_STOP_TIMEOUT}"
if [[ "$STATE" == "restarting" ]]; then
docker update --restart=no "$CID" >/dev/null 2>&1
"$DOCKER_BIN" update --restart=no "$CID" >/dev/null 2>&1
fi
if [[ "$STATE" != "dead" ]] && [[ "$STATE" != "exited" ]]; then
@@ -112,18 +112,18 @@ fn-scheduler-docker-local-retire-container() {
# to not send SIGKILL as the docs would indicate. If that fails, move
# on to the next.
# shellcheck disable=SC2086
docker stop $DOCKER_STOP_TIME_ARG "$CID" \
|| docker kill "$CID" \
"$DOCKER_BIN" stop $DOCKER_STOP_TIME_ARG "$CID" \
|| "$DOCKER_BIN" kill "$CID" \
|| dokku_log_warn "Unable to kill container ${CID}"
fi
STATE="$(docker inspect -f "{{ .State.Status }}" "$CID" 2>/dev/null || true)"
STATE="$("$DOCKER_BIN" inspect -f "{{ .State.Status }}" "$CID" 2>/dev/null || true)"
if [[ -z "$STATE" ]]; then
return
fi
if [[ "$STATE" != "dead" ]] && [[ "$STATE" != "exited" ]]; then
if ! docker kill "$CID"; then
if ! "$DOCKER_BIN" kill "$CID"; then
dokku_log_warn "Unable to kill container ${CID}"
fi
fi

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core scheduler-docker-local plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -18,14 +18,14 @@ scheduler-docker-local-post-delete() {
# remove all application containers & images
# shellcheck disable=SC2046
local DOKKU_APP_CIDS=$(docker ps -a --no-trunc | egrep "dokku/${APP}:" | awk '{ print $1 }' | xargs)
local DOKKU_APP_CIDS=$("$DOCKER_BIN" ps -a --no-trunc | egrep "dokku/${APP}:" | awk '{ print $1 }' | xargs)
if [[ -n "$DOKKU_APP_CIDS" ]]; then
# shellcheck disable=SC2086
docker rm -f $DOKKU_APP_CIDS >/dev/null 2>&1 || true
"$DOCKER_BIN" rm -f $DOKKU_APP_CIDS >/dev/null 2>&1 || true
fi
# shellcheck disable=SC2046
docker rmi $(docker images -q "$IMAGE_REPO" | xargs) &>/dev/null || true
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -q "$IMAGE_REPO" | xargs) &>/dev/null || true
}
scheduler-docker-local-post-delete "$@"

View File

@@ -42,7 +42,7 @@ scheduler-docker-local-pre-deploy() {
fi
# shellcheck disable=SC2086
docker run $DOKKU_GLOBAL_RUN_ARGS "${ARG_ARRAY[@]}" $IMAGE /bin/bash -c "find $CONTAINER_PATHS -not -user $DOKKU_APP_USER -print0 | xargs -0 -r chown -R $DOKKU_APP_USER" || true
"$DOCKER_BIN" run $DOKKU_GLOBAL_RUN_ARGS "${ARG_ARRAY[@]}" $IMAGE /bin/bash -c "find $CONTAINER_PATHS -not -user $DOKKU_APP_USER -print0 | xargs -0 -r chown -R $DOKKU_APP_USER" || true
}
scheduler-docker-local-pre-deploy "$@"

View File

@@ -14,7 +14,7 @@ scheduler-docker-local-pre-restore() {
# delete all "old" containers
# shellcheck disable=SC2046
docker rm $(docker ps --format "{{.Names}}" -a -f "label=$DOKKU_CONTAINER_LABEL" -q | grep -E '(.+\..+\.[0-9]+\.[0-9]+$)') &>/dev/null || true
"$DOCKER_BIN" rm $("$DOCKER_BIN" ps --format "{{.Names}}" -a -f "label=$DOKKU_CONTAINER_LABEL" -q | grep -E '(.+\..+\.[0-9]+\.[0-9]+$)') &>/dev/null || true
}
scheduler-docker-local-pre-restore "$@"

View File

@@ -0,0 +1,38 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
scheduler-app-status() {
declare desc="fetches the status for a given app"
declare trigger="scheduler-docker-local scheduler-app-status"
declare DOKKU_SCHEDULER="$1" APP="$2"
if [[ "$DOKKU_SCHEDULER" != "docker-local" ]]; then
return
fi
local PROCS=0 RUNNING=""
local APP_CIDS=$(get_app_container_ids "$APP")
for CID in $APP_CIDS; do
if (is_container_status "$CID" "Running"); then
RUNNING+="0"
else
RUNNING+="1"
fi
PROCS=$((PROCS + 1))
done
if [[ "${#RUNNING}" -eq 0 ]] || [[ "${#RUNNING}" -ne 0 ]] && [[ "$RUNNING" != *"0"* ]]; then
RUNNING="false"
elif [[ "$RUNNING" != *"1"* ]] && [[ "${#RUNNING}" -ne 0 ]]; then
RUNNING="true"
else
RUNNING="mixed"
fi
echo "$PROCS $RUNNING"
}
scheduler-app-status "$@"

View File

@@ -52,10 +52,10 @@ scheduler-docker-local-scheduler-deploy() {
dokku_log_info2 "stopping $APP.$PROC_TYPE ($cid)"
# Disable the container restart policy
docker container update --restart=no "$cid" &>/dev/null || true
"$DOCKER_BIN" container update --restart=no "$cid" &>/dev/null || true
# shellcheck disable=SC2086
docker stop $DOCKER_STOP_TIME_ARG "$cid" &>/dev/null
"$DOCKER_BIN" stop $DOCKER_STOP_TIME_ARG "$cid" &>/dev/null
# remove cid from oldids to skip the old container finish processing
oldids="$(remove_val_from_list "$cid" "$oldids" " ")"
done
@@ -94,16 +94,16 @@ scheduler-docker-local-scheduler-deploy() {
START_CMD=$(fn-scheduler-docker-local-extract-start-cmd "$APP" "$PROC_TYPE" "$START_CMD" "$DOKKU_HEROKUISH" "$DOKKU_PORT")
if [[ "$DOKKU_NETWORK_BIND_ALL" == "false" ]]; then
# shellcheck disable=SC2086
cid=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d -e PORT=$DOKKU_PORT "${ARG_ARRAY[@]}" $IMAGE $START_CMD)
cid=$("$DOCKER_BIN" run $DOKKU_GLOBAL_RUN_ARGS -d -e PORT=$DOKKU_PORT "${ARG_ARRAY[@]}" $IMAGE $START_CMD)
else
# shellcheck disable=SC2086
cid=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d $DOKKU_DOCKER_PORT_ARGS -e PORT=$DOKKU_PORT "${ARG_ARRAY[@]}" $IMAGE $START_CMD)
cid=$("$DOCKER_BIN" run $DOKKU_GLOBAL_RUN_ARGS -d $DOKKU_DOCKER_PORT_ARGS -e PORT=$DOKKU_PORT "${ARG_ARRAY[@]}" $IMAGE $START_CMD)
fi
else
START_CMD=$(fn-scheduler-docker-local-extract-start-cmd "$APP" "$PROC_TYPE" "$START_CMD" "$DOKKU_HEROKUISH")
# shellcheck disable=SC2086
cid=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d "${ARG_ARRAY[@]}" $IMAGE $START_CMD)
cid=$("$DOCKER_BIN" run $DOKKU_GLOBAL_RUN_ARGS -d "${ARG_ARRAY[@]}" $IMAGE $START_CMD)
fi
ipaddr=$(plugn trigger network-get-ipaddr "$APP" "$PROC_TYPE" "$cid")
@@ -114,10 +114,10 @@ scheduler-docker-local-scheduler-deploy() {
declare CID="$1" PROC_TYPE="$2" CONTAINER_INDEX="$3"
mkdir -p "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP"
echo "${CID} ${PROC_TYPE}.${CONTAINER_INDEX}" >>"${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP/failed-containers"
docker inspect "$CID" &>/dev/null && {
"$DOCKER_BIN" inspect "$CID" &>/dev/null && {
# Disable the container restart policy
docker container update --restart=no "$CID" &>/dev/null || true
docker stop "$CID" >/dev/null && docker kill "$CID" &>/dev/null
"$DOCKER_BIN" container update --restart=no "$CID" &>/dev/null || true
"$DOCKER_BIN" stop "$CID" >/dev/null && "$DOCKER_BIN" kill "$CID" &>/dev/null
}
trap - INT TERM EXIT
kill -9 $$
@@ -181,14 +181,14 @@ scheduler-docker-local-scheduler-deploy() {
sleep "$WAIT"
for oldid in $oldids; do
# Disable the container restart policy
docker container update --restart=no "$oldid" &>/dev/null || true
"$DOCKER_BIN" container update --restart=no "$oldid" &>/dev/null || true
# Attempt to stop, if that fails, then force a kill as docker seems
# to not send SIGKILL as the docs would indicate. If that fails, move
# on to the next.
# shellcheck disable=SC2086
docker stop $DOCKER_STOP_TIME_ARG "$oldid" \
|| docker kill "$oldid" \
"$DOCKER_BIN" stop $DOCKER_STOP_TIME_ARG "$oldid" \
|| "$DOCKER_BIN" kill "$oldid" \
|| plugn trigger retire-container-failed "$APP" "$oldid" # plugin trigger for event logging
done
) &

View File

@@ -14,15 +14,15 @@ scheduler-docker-local-scheduler-docker-cleanup() {
# delete all non-running containers
# shellcheck disable=SC2046
docker rm $(docker ps -a -f "status=exited" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
"$DOCKER_BIN" rm $("$DOCKER_BIN" ps -a -f "status=exited" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
# delete all dead containers
# shellcheck disable=SC2046
docker rm $(docker ps -a -f "status=dead" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
"$DOCKER_BIN" rm $("$DOCKER_BIN" ps -a -f "status=dead" -f "label=$DOKKU_CONTAINER_LABEL" -q) &>/dev/null || true
# delete unused images
# shellcheck disable=SC2046
docker rmi $(docker images -f 'dangling=true' -q) &>/dev/null &
"$DOCKER_BIN" rmi $("$DOCKER_BIN" images -f 'dangling=true' -q) &>/dev/null &
}
scheduler-docker-local-scheduler-docker-cleanup "$@"

View File

@@ -48,7 +48,7 @@ EOF
for CONTAINER_FILE in $CONTAINER_FILES; do
CIDS+="$(<"$DOKKU_ROOT/$APP/$CONTAINER_FILE")"
done
docker inspect "${CIDS[@]}" | python2.7 "$TMP_INSPECT_CMD"
"$DOCKER_BIN" inspect "${CIDS[@]}" | python2.7 "$TMP_INSPECT_CMD"
}

View File

@@ -33,10 +33,10 @@ scheduler-docker-local-scheduler-logs() {
local CID=$(<"${CONTAINERS[i]}")
local COLOR=${COLORS[i % ${#COLORS[*]}]}
if [[ $PRETTY_PRINT == "true" ]]; then
local DOKKU_LOGS_CMD+="(docker logs $DOKKU_LOGS_ARGS $CID 2>&1)"
local DOKKU_LOGS_CMD+="($DOCKER_BIN logs $DOKKU_LOGS_ARGS $CID 2>&1)"
else
local DOKKU_LOGS_PRETTY_PRINT_CMD="sed -r 's/^([^Z]+Z )/\x1b[${COLOR}m\1app[$DYNO]:\x1b[0m /gm'"
local DOKKU_LOGS_CMD+="(docker logs -t $DOKKU_LOGS_ARGS $CID 2>&1 | $DOKKU_LOGS_PRETTY_PRINT_CMD)"
local DOKKU_LOGS_CMD+="($DOCKER_BIN logs -t $DOKKU_LOGS_ARGS $CID 2>&1 | $DOKKU_LOGS_PRETTY_PRINT_CMD)"
fi
if [[ $i != "$MAX_INDEX" ]]; then
local DOKKU_LOGS_CMD+="& "

View File

@@ -24,7 +24,7 @@ scheduler-docker-local-scheduler-logs-failed() {
while read -r LINE || [[ -n "$LINE" ]]; do
CID="$(echo "$LINE" | cut -d ' ' -f1)"
PREFIX="$(echo "$LINE" | cut -d ' ' -f2)"
if docker inspect "${CID}" >/dev/null 2>&1; then
if "$DOCKER_BIN" inspect "${CID}" >/dev/null 2>&1; then
RUNNING_CONTAINERS+=("$CID")
else
DEAD_CONTAINERS+=("$CID")
@@ -44,7 +44,7 @@ scheduler-docker-local-scheduler-logs-failed() {
((MAX_INDEX = ${#RUNNING_CONTAINERS[*]} - 1)) || true
for i in ${!RUNNING_CONTAINERS[*]}; do
local CID="${RUNNING_CONTAINERS[i]}"
DOKKU_LOGS_CMD+="(docker logs $DOKKU_LOGS_ARGS $CID 2>&1)"
DOKKU_LOGS_CMD+="($DOCKER_BIN logs $DOKKU_LOGS_ARGS $CID 2>&1)"
if [[ $i != "$MAX_INDEX" ]]; then
local DOKKU_LOGS_CMD+="& "
else

View File

@@ -27,7 +27,7 @@ scheduler-docker-local-scheduler-retire() {
fi
fn-scheduler-docker-local-retire-container "$APP" "$CID" "$DEAD_TIME"
STATE="$(docker inspect -f "{{ .State.Status }}" "$CID" 2>/dev/null || true)"
STATE="$("$DOCKER_BIN" inspect -f "{{ .State.Status }}" "$CID" 2>/dev/null || true)"
if [[ -z "$STATE" ]]; then
DEAD_CONTAINERS+=("$CID")
continue
@@ -38,8 +38,8 @@ scheduler-docker-local-scheduler-retire() {
continue
fi
docker rm -f "$CID" >/dev/null 2>&1 || true
if docker inspect "${CID}" >/dev/null 2>&1; then
"$DOCKER_BIN" rm -f "$CID" >/dev/null 2>&1 || true
if "$DOCKER_BIN" inspect "${CID}" >/dev/null 2>&1; then
dokku_log_warn "Container ${CID} still running"
continue
fi

View File

@@ -66,7 +66,7 @@ scheduler-docker-local-scheduler-run() {
fi
# shellcheck disable=SC2086
docker run $DOKKU_GLOBAL_RUN_ARGS "${DOCKER_ARGS_ARRAY[@]}" $IMAGE $EXEC_CMD "$@"
"$DOCKER_BIN" run $DOKKU_GLOBAL_RUN_ARGS "${DOCKER_ARGS_ARRAY[@]}" $IMAGE $EXEC_CMD "$@"
}
scheduler-docker-local-scheduler-run "$@"

View File

@@ -21,10 +21,10 @@ scheduler-docker-local-scheduler-stop() {
if [[ -n "$DOKKU_APP_RUNNING_CONTAINER_IDS" ]]; then
# Disable the container restart policy
# shellcheck disable=SC2086
docker container update --restart=no $DOKKU_APP_RUNNING_CONTAINER_IDS &>/dev/null || true
"$DOCKER_BIN" container update --restart=no $DOKKU_APP_RUNNING_CONTAINER_IDS &>/dev/null || true
# shellcheck disable=SC2086
docker stop $DOCKER_STOP_TIME_ARG $DOKKU_APP_RUNNING_CONTAINER_IDS >/dev/null || true
"$DOCKER_BIN" stop $DOCKER_STOP_TIME_ARG $DOKKU_APP_RUNNING_CONTAINER_IDS >/dev/null || true
fi
if [[ "$REMOVE_CONTAINERS" == "true" ]]; then
@@ -32,7 +32,7 @@ scheduler-docker-local-scheduler-stop() {
if [[ -n "$DOKKU_APP_CIDS" ]]; then
# shellcheck disable=SC2086
docker rm -f $DOKKU_APP_CIDS >/dev/null 2>&1 || true
"$DOCKER_BIN" rm -f $DOKKU_APP_CIDS >/dev/null 2>&1 || true
fi
fi
}

View File

@@ -15,7 +15,7 @@ scheduler-docker-local-scheduler-tags-create() {
local TAG_OPTS=""
[[ $(is_tag_force_available) ]] && TAG_OPTS="-f"
# shellcheck disable=SC2086
docker tag $TAG_OPTS "$SOURCE_IMAGE" "$TARGET_IMAGE"
"$DOCKER_BIN" tag $TAG_OPTS "$SOURCE_IMAGE" "$TARGET_IMAGE"
}
is_tag_force_available() {

View File

@@ -12,7 +12,7 @@ scheduler-docker-local-scheduler-tags-destroy() {
return
fi
docker rmi "$IMAGE_REPO:$IMAGE_TAG"
"$DOCKER_BIN" rmi "$IMAGE_REPO:$IMAGE_TAG"
}
scheduler-docker-local-scheduler-tags-destroy "$@"

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core shell plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core ssh-keys plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -29,7 +29,8 @@ add_keys() {
fi
local count="$(wc -l "$KEY_FILE" | awk '{ print $1; }')"
[[ "$count" -eq 1 ]] || dokku_log_fail "Too many keys provided, set one per invocation of dokku ssh-keys:add <NAME> <KEY_FILE>"
# Don't check for "-eq 1" as no newlines is also a valid SSH key
[[ "$count" -lt 2 ]] || dokku_log_fail "Too many keys provided, set one per invocation of dokku ssh-keys:add <NAME> <KEY_FILE>"
ssh-keygen -lf "$KEY_FILE" &>/dev/null || dokku_log_fail "Key specified in is not a valid ssh public key"
create_ssh_key_file
verify_ssh_key_exists

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core storage plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core tags plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -12,7 +12,7 @@ tags_main_cmd() {
verify_app_name "$APP"
dokku_log_info2_quiet "Image tags for $IMAGE_REPO"
docker images "$IMAGE_REPO"
"$DOCKER_BIN" images "$IMAGE_REPO"
}
tags_main_cmd "$@"

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core tar plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

View File

@@ -5,8 +5,8 @@ trace_help_content_func() {
declare desc="return trace plugin help content"
cat <<help_content
trace, [DEPRECATED] Enables/Disables trace mode
trace:on, Clones an app
trace:off, Create a new app
trace:on, Enable trace mode
trace:off, Disable trace mode
help_content
}

View File

@@ -1,4 +1,4 @@
[plugin]
description = "dokku core trace plugin"
version = "0.17.2"
version = "0.17.8"
[plugin.config]

2
rpm.mk
View File

@@ -63,10 +63,8 @@ endif
--depends '/usr/bin/docker' \
--depends 'bind-utils' \
--depends 'curl' \
--depends 'gcc' \
--depends 'git' \
--depends 'gliderlabs-sigil' \
--depends 'make' \
--depends 'man-db' \
--depends 'nc' \
--depends 'nginx >= 1.8.0' \

View File

@@ -136,7 +136,7 @@ teardown() {
deploy_app
create_attach_network
run dokku nginx:build-config "$TEST_APP"
run /bin/bash -c "dokku nginx:build-config $TEST_APP"
echo "output: "$output
echo "status: "$status
assert_success

View File

@@ -13,6 +13,9 @@ setup() {
# now create key that will be really used
create_key
# Test key without a trailing newline
echo -n "$KEY" > /tmp/testkey-no-newline.pub
# the temporary key is useful for adding in the file with two keys
# useful for a negative test
{ cat /tmp/testkey.pub ; echo "$KEY" ; } > /tmp/testkey-double.pub
@@ -70,6 +73,10 @@ teardown() {
echo "output: $output"
echo "status: $status"
assert_success
run /bin/bash -c "dokku ssh-keys:add name5 /tmp/testkey-no-newline.pub"
echo "output: $output"
echo "status: $status"
assert_success
# leave this as the last test in the sequence! It introduces an error in authorized_keys
run /bin/bash -c 'echo invalid >> "${DOKKU_ROOT:-/home/dokku}/.ssh/authorized_keys"'

View File

@@ -5,9 +5,11 @@ load test_helper
setup() {
global_setup
deploy_app
rm -f /tmp/fake-docker-bin
}
teardown() {
rm -f /tmp/fake-docker-bin
destroy_app
global_teardown
}
@@ -46,3 +48,33 @@ teardown() {
dokku --force apps:destroy "${TEST_APP}-2"
}
@test "(report) custom docker bin" {
export DOCKER_BIN="docker"
run /bin/bash -c "dokku report"
echo "output: $output"
echo "status: $status"
assert_output_contains "herokuish version:"
assert_success
export DOCKER_BIN="/usr/bin/docker"
run /bin/bash -c "dokku report"
echo "output: $output"
echo "status: $status"
assert_output_contains "herokuish version:"
assert_success
touch /tmp/fake-docker-bin
echo '#!/usr/bin/env bash' >/tmp/fake-docker-bin
echo '/usr/bin/docker "$@"' >>/tmp/fake-docker-bin
chmod +x /tmp/fake-docker-bin
export DOCKER_BIN="/tmp/fake-docker-bin"
run /bin/bash -c "dokku report"
echo "output: $output"
echo "status: $status"
assert_output_contains "herokuish version:"
assert_success
unset DOCKER_BIN
}