mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
refactor: deprecate the --rm and --rm-container flags
These flags are not commonly invoked by users, causing issues when cleaning up old containers. Rather than instruct users to use some random flag, just change the default to what is likely to be more common.
This commit is contained in:
@@ -3,7 +3,10 @@
|
||||
## Changes
|
||||
|
||||
- The network plugin can now set an `initial-network` for all containers on creation. This is a replacement for specifying the `--network` flag via the `docker-options` plugin. Please see the [network documentation](/docs/networking/network.md#attaching-an-app-to-a-network) for more information.
|
||||
- The `dokku run` command now always removes the ephemeral container on exit. Users that need a persistent container should instead specify a `console` process type in their `Procfile` specifying an available shell (usually either `bash` or `sh`) and scale that container appropriately.
|
||||
|
||||
|
||||
## Deprecations
|
||||
|
||||
- In previous versions of Dokku, the only way to specify a custom `Dockerfile` was to use the `docker-options` plugin to set the `--file` flag for a docker build. As of 0.25.0, the `builder-dockerfile:set` command should be used instead, as outlined in the [docs here](/docs/deployment/builders/dockerfiles.md#changingthe-dockerfile-location). Usage of the old method should be migrated to the new method.
|
||||
- The `--rm` and ``--rm-container` flags may be specified but no longer have any effect on `dokku run`.
|
||||
|
||||
@@ -94,7 +94,7 @@ The following config variables have special meanings and can be set in a variety
|
||||
| `DOKKU_CHECKS_URL` | `https://dokku.com/docs/deployment/zero-downtime-deploys/` | `/etc/environment` <br /> `~dokku/.dokkurc` <br /> `~dokku/.dokkurc/*` | Url displayed during deployment when no CHECKS file exists. |
|
||||
| `DOKKU_DETACH_CONTAINER` | none | `--detach` flag | Whether to detach a container started via `dokku run`. |
|
||||
| `DOKKU_QUIET_OUTPUT` | none | `--quiet` flag | Silences certain header output for `dokku` commands. |
|
||||
| `DOKKU_RM_CONTAINER` | none | `dokku config:set` <br /> `--rm-container` flag <br /> `--rm` flag | Whether to keep `dokku run` containers around or not. |
|
||||
| `DOKKU_RM_CONTAINER` | none | `dokku config:set` <br /> | Deprecated: Whether to keep `dokku run` containers around or not. |
|
||||
| `DOKKU_TRACE` | none | `dokku trace:on` <br /> `dokku trace:off` <br /> `--trace` flag | Turn on very verbose debugging. |
|
||||
| `DOKKU_APP_PROXY_TYPE` | `nginx` | `dokku proxy:set` | |
|
||||
| `DOKKU_APP_RESTORE` | `1` | `dokku config:set` <br /> `dokku ps:stop` | |
|
||||
|
||||
@@ -17,7 +17,6 @@ in order to avoid SSH interpretting Dokku arguments for itself.
|
||||
```
|
||||
--quiet suppress output headers
|
||||
--trace enable DOKKU_TRACE for current execution only
|
||||
--rm|--rm-container remove docker container after successful dokku run <app> <command>
|
||||
--force force flag. currently used in apps:destroy and other ":destroy" commands
|
||||
```
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Sometimes it is necessary to run a one-off command under an application. Dokku m
|
||||
|
||||
## Usage
|
||||
|
||||
The `run` command can be used to run a one-off process for a specific command. This will start a new container and run the desired command within that container. Note that this container image will be stay around even after command completes. The container image will be the same container image as was used to start the currently deployed application.
|
||||
The `run` command can be used to run a one-off process for a specific command. This will start a new container and run the desired command within that container. This contianer will be removed after the process exits. The container image will be the same container image as was used to start the currently deployed application.
|
||||
|
||||
```shell
|
||||
# runs `ls -lah` in the `/app` directory of the application `node-js-app`
|
||||
@@ -29,23 +29,6 @@ console: bundle exec racksh
|
||||
dokku run my-app console
|
||||
```
|
||||
|
||||
If the container running the command should be removed after exit, the `--rm-container` or `--rm` global flags can be specified to remove the containers automatically:
|
||||
|
||||
```shell
|
||||
dokku --rm-container run node-js-app ls -lah
|
||||
dokku --rm run node-js-app ls -lah
|
||||
```
|
||||
|
||||
Alternatively, a global property can be set to always remove `run` containers.
|
||||
|
||||
```shell
|
||||
# don't keep `run` containers around
|
||||
dokku config:set --global DOKKU_RM_CONTAINER=1
|
||||
|
||||
# revert the above setting and keep containers around
|
||||
dokku config:unset --global DOKKU_RM_CONTAINER
|
||||
```
|
||||
|
||||
Containers may have specific labels attached. In order to avoid issues with dokku internals, do not use any labels beginning with either `com.dokku` or `org.label-schema`.
|
||||
|
||||
```shell
|
||||
|
||||
Reference in New Issue
Block a user