Closed nyanshak closed 8 years ago
Yep! That is the expected result. Would you mind submitting a pull request for that fix? Thanks for noticing!
I just realized this is probably not 100% distributive's fault here. It was definitely related to my environment, as docker-machine will not auto-sync on Mac OS X. By running docker-machine ssh default 'sudo ntpclient -s -h pool.ntp.org'
before trying to build, it builds correctly. It's my mistake, but docker containers pull the time from the underlying host (in this case the virtualbox driver), which does not keep its time in sync. I can still submit a pull request if you'd like, but fixing the problem with virtualbox time syncing would go to the root cause.
Ah, gotcha. Yeah, let's wait on upstream rather than adding a patch here. Maybe we can add a comment with the fix for those using b2d?
Yeah, it's strange though. I can see this in boot2docker's crontab, which should restart ntpd every minute:
# restart ntpd to combat laptop sleep + VM pause
0 * * * * killall ntpd > /dev/null 2>&1; /etc/rc.d/ntpd
However, that still didn't seem to fix the problem for me. I'll raise it upstream.
Can you post your updated Dockerfile after sucessfully applying your fix, or if it's convenient, create a PR with a Dockerfile that has that line commented out?
Created pull request https://github.com/CiscoCloud/distributive/pull/100
Expected: Running
docker build .
successfully builds a working Dockerfile to do testing Actual:Cause: Incorrect time causes SSL certificate verification to fail while trying to 'go get' dependencies. Environment: docker-machine using virtualbox on Mac OS X 10.11.1 Beta (El Capitan) [pretty sure this is not relevant] Possible fix: run ntpd somewhere in Dockerfile, e.g.: RUN ntpd -d -q -n -p 0.pool.ntp.org After applying that fix, I get something like this:
I'm not sure that that is the expected result of running the test, but at least I can get to the point of running the tests.