I’m using @cristualexandru solution to update the time in the container every time I unlock my computer.
Prerequisites (There should be a possibility for most operating systems):
- Windows 10 (or a possibility to start a command at login)
- Installed “bash” (Cygwin or similar) environment installed
-
Create a file “docker-sync-time.bat” with the following content:
@echo off
echo Syncing docker container time…
bash -c “docker run --net=host --ipc=host --uts=host --pid=host --security-opt=seccomp=unconfined --privileged --rm alpine date -s “$(date -u ‘+%%Y-%%m-%%d %%H:%%M:%%S’)”” -
Start “Task Scheduler”
-
Add a task (“Task Scheduler Library” -> “Create New Task…”) that starts the batch script every time you login