Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker container with random date #34

Closed
teasy44 opened this issue Oct 11, 2021 · 4 comments
Closed

Docker container with random date #34

teasy44 opened this issue Oct 11, 2021 · 4 comments
Labels
good first issue Good for newcomers Third party Needs an update from the third party library type: backup

Comments

@teasy44
Copy link

teasy44 commented Oct 11, 2021

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 date there 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
Copy link
Owner

ttionya commented Oct 11, 2021

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
Copy link
Owner

ttionya commented Oct 11, 2021

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
Copy link
Author

teasy44 commented Oct 11, 2021

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
Copy link
Owner

ttionya commented Oct 11, 2021

Hey @teasy44 ,

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

@ttionya ttionya closed this as completed Oct 11, 2021
@ttionya ttionya changed the title TimeZone Docker container with random date Oct 11, 2021
@ttionya ttionya added good first issue Good for newcomers Third party Needs an update from the third party library type: backup labels Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Third party Needs an update from the third party library type: backup
Projects
None yet
Development

No branches or pull requests

2 participants