https://github.com/rsoury/sleeper
A tiny sleeper app for container testing or any testing in general...
https://github.com/rsoury/sleeper
Last synced: 3 months ago
JSON representation
A tiny sleeper app for container testing or any testing in general...
- Host: GitHub
- URL: https://github.com/rsoury/sleeper
- Owner: rsoury
- Created: 2018-07-04T11:30:15.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-04T23:39:06.000Z (almost 7 years ago)
- Last Synced: 2025-01-06T21:35:26.056Z (4 months ago)
- Language: Python
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sleeper
Print each second and sleep over a duration. For testing purposes.
This is a dummy container that sleeps over an environment set duration (default: 30 - 60 seconds) and prints to stdout each second.
I personally needed something like to mess around with long-living containers.
### Change duration
Change the environment variables to alter the duration in which the sleeper sleeps.
`SLEEP_START=100`
`SLEEP_STOP=120`
This example will decided to sleep for a randomised duration between 100 seconds and 120 seconds.### To pull the image
`docker pull rsoury/sleeper`
### To build the image locally
1. `git clone [email protected]:rsoury/sleeper.git`
2. `docker build . -t rsoury/sleeper -f Dockerfile.build`### To run the sleeper inside Docker
`docker run --rm rsoury/sleeper`
### To run the sleeper outside a container
`python -u ./sleeper.py`