ttionya / vaultwarden-backup

Backup vaultwarden (formerly known as bitwarden_rs) SQLite3/PostgreSQL/MySQL/MariaDB database by rclone. (Docker)
MIT License
1.04k stars 119 forks source link

Docker container with random date #34

Closed teasy44 closed 3 years ago

teasy44 commented 3 years ago

Heyho! I got the tool just half way working. Setting up RCLONE Config over SFTP with my Synology and started the Container. RClone config is successfully recognized with no failure messages. But now my issue: I set the timzone manually over ENV config to Europe/Berlin but when i log into the container and try to get the actual time with datethere comes only some random times and days. Whats the problem i didn't see? So the CRON Job should start every day at 23:30, but does not start. What information do you need to help me out?

Thank you! :)

date

ttionya commented 3 years ago

Hey @teasy44 ,

I have never encountered such a strange situation.

As far as I know, Docker uses the time of the host.

Can you confirm that the host is getting the correct time when you enter the container to get the wrong random time. And check the /etc/timezone file in the container to confirm if it is Europe/Berlin.

ttionya commented 3 years ago

I found some articles that might be useful.

https://serverfault.com/questions/1037146/docker-container-with-random-date https://www.reddit.com/r/docker/comments/hdru82/time_in_docker_container_returns_random_value/

teasy44 commented 3 years ago

Hey @ttionya, thanks for the fast answering! :) I browsed through the whole internet to find a working solution: Post from Joshua Powers (powersj) wrote on 2021-02-03 at https://bugs.launchpad.net/cloud-images/+bug/1896443

Hi,

Thanks for the link about libseccomp. After reading that link and a couple of bugs on Github about this it seems the root cause is due to containers of newer releases (e.g. 20.04), which make syscalls that hosts with older software might not know about.

To resolve then, users need to:

1) Use Docker version 19.03.9 or newer 2) Ensure the host has libseccomp version of 2.4.2 or higher. libseccomp is already 2.4.3 in all supported versions of Ubuntu and appears to have the newer syscalls listed.

I am marking this as invalid for the "cloud-images" project as it is clear this is not an Ubuntu docker image issue.

As i installed on the host (raspberry) a newer verion of libseccomp with that commands...

curl http://ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb --output libseccomp2_2.5.1-1_armhf.deb

sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb

... and restarted the raspberry, the container accepted the right time and timezone. Maybe someone struggles with the same problem. This method was the solution for me :)

ttionya commented 3 years ago

Hey @teasy44 ,

Thank you for the solution, I believe it will help people with the same problem.