https://github.com/kilna/exitpoint
A container image meant to run one command on start, and another upon termination
https://github.com/kilna/exitpoint
Last synced: 8 months ago
JSON representation
A container image meant to run one command on start, and another upon termination
- Host: GitHub
- URL: https://github.com/kilna/exitpoint
- Owner: kilna
- License: mit
- Created: 2024-06-06T03:47:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-08T18:00:58.000Z (11 months ago)
- Last Synced: 2024-12-31T04:13:09.196Z (9 months ago)
- Language: Shell
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.yml
- License: LICENSE
Awesome Lists containing this project
README
# exitpoint
**A container image to run an exitpoint.sh script upon termination**
[](https://hub.docker.com/r/kilna/exitpoint)
[](https://hub.docker.com/r/kilna/exitpoint)
[](https://hub.docker.com/r/kilna/exitpoint)
[](https://hub.docker.com/r/kilna/exitpoint)
[](https://hub.docker.com/r/kilna/exitpoint)[](https://github.com/kilna/exitpoint)
[](https://github.com/kilna/exitpoint/forks)
[](https://github.com/kilna/exitpoint/watchers)
[](https://github.com/kilna/exitpoint/stargazers)A docker image that runs an exitpoint.sh script when terminated.
## Usage
This image is meant primarily to be a base image that will be derived from,
see the example Dockerfiles.### Examples
* [Run nothing on start, exitpoint script on termination](https://github.com/kilna/exitpoint/tree/main/examples/exit-only)
* [Synchronous (not backgrounded) command on start, with exitpoint](https://github.com/kilna/exitpoint/tree/main/examples/synchronous)
* [Backgrounded start process, with exitpoint](https://github.com/kilna/exitpoint/tree/main/examples/background)### Dockerfile ENV Variables
These should be set by `ENV` statements in your derived container's Dockerfile.
* `EXITPOINT` - Sets the path of the exitpoint script. Defaults to
`/exitpoint.sh`.
* `ENTRYPOINT` - An optional entrypoint script to run by this base image's
entrypoint script `/exitpoint-entrypoint.sh`.### Exit Point variables
These are environment variables that are available to your exitpoint script
* `CMD_EXIT` - Contains the exit code as returned from the entrypoint + docker
CMD.
* `SIGNAL` - Contains the name of the signal received that caused it to be
called.## Author
[Kilna, Anthony](http://github.com/kilna)
[kilna@kilna.com](mailto:kilna@kilna.com)