An Ubuntu Docker image with pre-installed faketime.
825
Dockerfile linksWhere to file issues:
https://github.com/andy23512/faketime-machine-docker/issues
Maintained by:
Tangent Chang ( andy23512 )
Image updates:
images PRs
images repo (history)
Faketime is a CLI tool that can easily change the date and time of a single process or whole system. It's really helpful for testing the behavior of projects at different time.
For more information about faketime, please visit https://github.com/wolfcw/libfaketime.
faketime-machine instanceStarting a faketime-machine instance is simple:
$ docker run --name some-faketime-machine -e FAKETIME=some-faketime-setting -d andy23512/faketime-machine
... where some-faketime-setting is the time setting you want to assign to your container, such as '2008-12-24 08:15:42' for a certain time or '-15d' for 15 days ago from now.
You can more information about this config at official document of faketime.
docker stack deploy or docker-composeExample docker-compose.yml for mysql:
version: '3.1'
services:
faketime-machine:
image: andy23512/faketime-machine
environment:
FAKETIME: -15d
Run docker stack deploy faketime-machine (or docker-compose up).
The docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your faketime-machine container:
$ docker exec -it some-faketime-machine bash
And you can try to print out the time with:
$ date
GNU General Public License v2.0
Content type
Image
Digest
Size
161.7 MB
Last updated
over 8 years ago
docker pull andy23512/faketime-machine