2022-03-07 21:45:54 +00:00
|
|
|
# Fresh: Keeping your docker stacks up to date
|
|
|
|
|
2022-03-08 23:38:57 +00:00
|
|
|
Fresh was written to scratch an itch. It works by querying the respective repositories
|
|
|
|
returning
|
|
|
|
|
2022-03-08 00:04:03 +00:00
|
|
|
## Building
|
2022-03-07 21:45:54 +00:00
|
|
|
|
2022-03-10 01:32:47 +00:00
|
|
|
Build using NoccyLabs Pharlite:
|
2022-03-07 21:45:54 +00:00
|
|
|
|
2022-03-10 01:32:47 +00:00
|
|
|
$ tools/pharlite
|
|
|
|
|
|
|
|
## Installing
|
|
|
|
|
|
|
|
Download the latest version (or build it yourself) and move it into `/usr/bin`.
|
2022-03-07 21:45:54 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2022-03-08 23:38:57 +00:00
|
|
|
To check for updates, pull updated images and recreate any containers defined in the
|
|
|
|
`docker-compose.yml` in the current directory:
|
2022-03-07 21:45:54 +00:00
|
|
|
|
2022-03-10 01:32:47 +00:00
|
|
|
$ fresh.phar
|
2022-03-07 21:45:54 +00:00
|
|
|
|
2022-03-08 23:38:57 +00:00
|
|
|
For all available options, use the `--help` flag.
|
2022-03-07 21:45:54 +00:00
|
|
|
|
2022-03-08 23:38:57 +00:00
|
|
|
## Known Issues
|
2022-03-07 21:45:54 +00:00
|
|
|
|
2022-03-08 23:38:57 +00:00
|
|
|
- There is currently no way to update the state when manually updating using the
|
|
|
|
`--check` flag.
|
|
|
|
- Only checks authenticated registries for new versions. But if you are using
|
|
|
|
this you probably aren't using DockerHub anyway.
|
|
|
|
|
|
|
|
## FAQ
|
|
|
|
|
|
|
|
- **How does Fresh remember the last seen hash?** The container hashes are stored
|
|
|
|
in the same directory as the `docker-compose.yml` file in a file named `fresh.yml`.
|
|
|
|
Remove this file to force trigger an update.
|
2022-03-10 01:32:47 +00:00
|
|
|
- **What are these hashes?** Fresh grabs the manifest for the image from the registry
|
|
|
|
and proceeds to hash a concatenation of all the various build layer hashes. This
|
|
|
|
should mean if the image is new but the layers are the same nothing will be updated.
|
2022-03-08 23:38:57 +00:00
|
|
|
|
|
|
|
## Changes
|
|
|
|
|
|
|
|
**0.1.1**
|
|
|
|
|
|
|
|
- Moved the logic from the entrypoint script to its own class.
|
|
|
|
- Added locking (though `fresh.lock` lockfile) to prevent multiple instances.
|
|
|
|
- Added `--after` hook to invoke script after update.
|
|
|
|
- Disabled automatic flushing of the state to disk; --check will no longer update
|
|
|
|
the state file, but --pull and default update will.
|
2022-03-07 21:45:54 +00:00
|
|
|
|