Commit Graph

28 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
dac566e75e refactor: move all shellcheck disable definitions to .shellcheckrc file
This makes standard use of shellcheck work without needing to provide extra configuration anywhere.

Also remove use of inline 'shellcheck disable' calls that are already defined in the .shellcheckrc and don't need to be set inline.
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
c4c6ac5617 feat: add the ability to disable the init process
This allows projects using s6 overlay - in particular linxserver images - the ability to disable --init flag injection.

Closes #5287
2022-08-10 21:32:55 -04:00
Jose Diaz-Gonzalez
d8e9511769 fix: correct issue where more complex docker args were not properly parsed when scheduling containers
In cases where a docker arg uses backticks - which may happen with docker labels - scheduled containers would fail to support these due to performing a double-eval. This is particularly noticeable for traefik labels, where backticks and parenthesis are common. This fix properly handles docker args as an array instead of performing an extra eval when scheduling containers.
2022-07-30 00:48:38 -04:00
Jose Diaz-Gonzalez
92ecc76000 chore: always use long-form for image removal 2022-04-20 20:09:16 -04:00
Jose Diaz-Gonzalez
62a3eff5bb refactor: move apps listing from common plugin to apps plugin
This helps centralize app-related listing fetching.
2022-02-26 00:37:51 -05:00
Jose Diaz-Gonzalez
76201aed64 feat: add ability to deploy process types in parallel 2021-10-06 02:04:21 -04:00
Jose Diaz-Gonzalez
1d1cf56692 fix: run shfmt 2021-10-03 22:31:05 -04:00
Jose Diaz-Gonzalez
3d239344fe refactor: use eval set hack to preserve whitespace 2021-10-03 20:09:16 -04:00
Jose Diaz-Gonzalez
6f2c218f29 chore: fix shfmt issue 2021-10-03 19:47:54 -04:00
Jose Diaz-Gonzalez
abfb0d3977 fix: do not require double quotes when issuing dokku run commands
This was broken in the #4736.
2021-10-03 19:46:42 -04:00
Jose Diaz-Gonzalez
6c6e26712d refactor: move helper function to internal-functions 2021-08-12 21:11:11 -04:00
Jose Diaz-Gonzalez
9e18736475 feat: add ability to scope retire call to a single app
Also cleanup the log output a bit for the ps:retire command.
2021-08-08 03:04:25 -04:00
Jose Diaz-Gonzalez
5a19cebfd7 fix: do not mark images dead when they still have tags 2021-08-05 17:48:09 -04:00
Jose Diaz-Gonzalez
48fa04a05b fix: ensure dead files are created for docker object retirement 2020-12-13 02:05:30 -05:00
Jose Diaz-Gonzalez
0786954d34 feat: schedule related images for cleanup when retiring containers
If the containers no longer exist and the images are unused, we should remove the images as well.

Note that images may sometimes stick around for a little while, depending on the retire schedule and the wait time specified for the container.

Closes #4104
2020-11-26 03:21:45 -05:00
Jose Diaz-Gonzalez
53a76b1353 feat: implement ps:retire 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
e67b96780d refactor: unify command declaration across codebase 2020-02-10 01:40:30 -05:00
Jose Diaz-Gonzalez
ef7894fdfa refactor: standardize help generation 2020-02-10 00:37:00 -05:00
Jose Diaz-Gonzalez
44fcea0ffa refactor: use new-style docker management commands
This PR uses the new syntax for commands introduced in Docker 1.13, making it a bit easier to understand just what a particular command is trying to do.

This also pushes the long-form syntax for docker command flags, which are also easier to understand at a glance.
2019-09-15 18:55:53 -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
0375bc3e97 fix: quiet ps:retire where possible
Log output for ps:retire was previously a bit too verbose because we weren't handling the following edge-cases.

- if a container doesn't exist, remove it from the dead container list
- ensure a restarting container is properly killed
- only attempt to stop/kill if the state is not dead or exited
- do not attempt to do anything if the container doesn't exist
- correct check on running state
2019-01-12 22:49:23 -05:00
Jose Diaz-Gonzalez
86795ddacc tests: run mvdan/shfmt on test runs
While I do not agree with _every_ style change, this will force Dokku to have consistent formatting across all shell scripts, which is arguably a Good Thing™.

The command used to reprocess everything is:

```shell
shfmt -l -bn -ci -i 2 -w .
```
2019-01-07 01:25:55 -05:00
Jose Diaz-Gonzalez
ba157867c1 fix: Use correct container id variable for killing containers
The first pass at stop/kill would fail as the variable was incorrect.
2018-12-17 17:25:43 -05:00
Jose Diaz-Gonzalez
5b9eff6114 fix: add missing source of config functions
Closes dokku/dokku#3323
2018-12-04 16:13:47 -05:00
Jose Diaz-Gonzalez
deeaf6dc41 fix: ensure path exists 2018-10-21 12:50:39 -04:00
Jose Diaz-Gonzalez
8a9c77a061 fix: pass lint 2018-10-21 12:50:39 -04:00
Jose Diaz-Gonzalez
38ed9bff39 feat: add a way to retire old containers scheduled by the docker-local plugin
These will be killed on a cron schedule, allowing us to ensure old containers don't run once memory pressure clears up - even across restarts.

Closes #3225
2018-10-21 12:50:39 -04:00
Jose Diaz-Gonzalez
7349c30cd9 feat: allow disabling chown for persistent storage in scheduler-docker-local
Some systems - such as a mounted read-only CIFS filesystem - do not fully support chown, and chowning should be considered optional for cases when the host os has already taken care of permissioning. This commit allows users to disable chown by setting a property on the scheduler-docker-local plugin.
2018-08-01 06:51:47 -04:00