feat: add --no-cache flag to ps:rebuild
The `ps:rebuild` command now accepts `--no-cache` to perform a single uncached build regardless of builder, without persisting any setting for later deploys. The railpack builder now also honors `--no-cache` when set via `docker-options`, and build records are now correctly attributed when flags precede the app name.
This commit is contained in:
27 files changed
+316
-9
No files matched your search
@@ -5,7 +5,7 @@
|
||||
|
||||
```
|
||||
ps:inspect <app> # Displays a sanitized version of docker inspect for an app
|
||||
ps:rebuild [--parallel count] [--all|<app>] # Rebuilds an app from source
|
||||
ps:rebuild [--parallel count] [--no-cache] [--all|<app>] # Rebuilds an app from source
|
||||
ps:report [<app>] [<flag>] # Displays a process report for one or more apps
|
||||
ps:restart [--parallel count] [--all|<app>] [<process-name>] # Restart an app
|
||||
ps:restore [<app>] # Start previously running apps e.g. after reboot
|
||||
@@ -58,6 +58,29 @@ Finally, the number of parallel workers may be automatically set to the number o
|
||||
dokku ps:rebuild --all --parallel -1
|
||||
```
|
||||
|
||||
#### Rebuilding without the build cache
|
||||
|
||||
> [!IMPORTANT]
|
||||
> New as of 0.38.34
|
||||
|
||||
An app may be rebuilt without using the build cache by specifying the `--no-cache` flag. This applies only to the triggered rebuild, and no setting is persisted for later deploys.
|
||||
|
||||
```shell
|
||||
dokku ps:rebuild --no-cache node-js-app
|
||||
```
|
||||
|
||||
The `--no-cache` flag may also be combined with the `--all` and `--parallel` flags.
|
||||
|
||||
```shell
|
||||
dokku ps:rebuild --all --no-cache
|
||||
```
|
||||
|
||||
The effect of the flag depends on the builder in use:
|
||||
|
||||
- `dockerfile`, `nixpacks`, and `railpack`: The build is run with `--no-cache`. For the `dockerfile` builder, [BuildKit directory caches](/docs/deployment/builders/dockerfiles.md#buildkit-directory-caching) are not cleared.
|
||||
- `pack`: The build is run with `--clear-cache`.
|
||||
- `herokuish`: The build cache is purged before the build, in the same way as `repo:purge-cache`.
|
||||
|
||||
A missing linked container will result in failure to boot apps. Services should all be started for apps being rebuilt.
|
||||
|
||||
### Restarting apps
|
||||
|
||||
Reference in new issue
Block a user