Sign inSign up

thedeem/wildfly-floating-time

By thedeem

•Updated about 9 years ago

Wildfly Docker image with option to change system time

Image
1

251

thedeem/wildfly-floating-time repository overview

⁠Wildfly with floating time Docker image

Some projects require you to change time (to verify services that use Date.now()). Docker by default provides no way to change date - it uses host's system settings. Your best bet is to use Libfaketime⁠.

⁠Usage

To change time, all you have to do is to set environment variable FAKETIME. If it isn't set, Docker will use your system's date.

All formats and informations can be found on Libfaketime⁠ GitHub. Most popular examples are shown below.

⁠Static time

If you want to set time that never changes (is always the same), use format below.

FAKETIME: "2020-12-24 20:30:00"
⁠Change time

If you want to set concrete date, but also want the clock to work normally, just use @ option before format.

FAKETIME: "@2020-12-24 20:30:00"
⁠Relative time

Libfaketime also offers relative time options if you want container to be set always f.e. some years forward. This format begins with + or - and looks like this:

FAKETIME: "+1.5y"

Tag summary

Content type

Image

Digest

Size

352.3 MB

Last updated

about 9 years ago

docker pull thedeem/wildfly-floating-time