docker:containers:manipulating_time_inside_a_docker_container
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
docker:containers:manipulating_time_inside_a_docker_container [2020/12/04 15:40] – peter | docker:containers:manipulating_time_inside_a_docker_container [2020/12/04 15:41] (current) – peter | ||
---|---|---|---|
Line 49: | Line 49: | ||
sudo docker run --rm -it my/faketime date | sudo docker run --rm -it my/faketime date | ||
Thu Aug 29 12:08:45 UTC 2020 | Thu Aug 29 12:08:45 UTC 2020 | ||
+ | </ | ||
- | I’ve baked a +2 day clock offset into this image with an ENV directive | + | <WRAP info> |
+ | **NOTE: | ||
+ | </ | ||
+ | You can also just specify FAKETIME when launching the container: | ||
+ | |||
+ | <code bash> | ||
sudo docker run --rm -it --env FAKETIME=+9d my/faketime date | sudo docker run --rm -it --env FAKETIME=+9d my/faketime date | ||
Sat Sep 05 12:08:57 UTC 2020 | Sat Sep 05 12:08:57 UTC 2020 |
docker/containers/manipulating_time_inside_a_docker_container.1607096402.txt.gz · Last modified: 2020/12/04 15:40 by peter