Java based web app showing the time inside a pod, for testing when shifting container through time.
257
Simple web server that just specifies the system time for time travel tests
For a project where we shift containers through time a simple web server was needed to do basic tests. It just needs to display the "system time" inside the container. So I decided to write a small Java based web server for this task which displays the time inside the container in different human and machine readable formats.
We're using libfaketime to modify the system time inside the container. For testing purposes, here it gets installed right away into the webapp image. If you'd like to move any app or container in time in a kubernetes/openshift environment, without modification of the image, then feel free to contact me at sydals.itc(at)gmail.com.
This source of the project is to be found at https://github.com/SydalsITC/timetraveller.
To run a copy of the webapp, simply use the following command:
docker run --rm -itd --name drwho -p 8080:8080 sydalsitc/timetraveller:1.0
There's a docker-compose.yml, too, for easy start and daemonizing:
docker-compose up -d
When up and running, the webserver is available at http://localhost:8080/ .
The webapp is intended for developing and debugging purposes. Therefor it displays the time inside the container as well as some environment variables for libfaketime in different, easy or machine readable format. There's no fancy, shiny look, just timeless content. :-)
Example:
{
"uptime": 214,
"epoch": 1759616006,
"now": "2025-10-04T22:13:26.474068134Z",
"FAKETIME": "+7d",
"LD_PRELOAD": "/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1"
}
Content type
Image
Digest
sha256:a50d0c14c…
Size
280.1 MB
Last updated
12 months ago
docker pull sydalsitc/timetraveller