Docker虚拟机时间不是主机操作系统时间

我遵循http://docs.drone.io/installation/中的安装文档

以下是我docker-compose.yml文件

 version: '2' services: drone-server: image: drone/drone:0.8 ports: - 80:8000 - 9000 volumes: - /var/lib/drone:/var/lib/drone/ restart: always environment: - DRONE_OPEN=true - DRONE_HOST= localhost - DRONE_GITLAB=true - DRONE_GITLAB_CLIENT=dfsdfsdf - DRONE_GITLAB_SECRET=dsfdsf - DRONE_GITLAB_URL=https://tecgit01.com - DRONE_SECRET=${DRONE_SECRET} drone-agent: image: drone/agent:0.8 restart: always depends_on: - drone-server volumes: - /var/run/docker.sock:/var/run/docker.sock environment: - DRONE_SERVER=drone-server:9000 - DRONE_SECRET=${DRONE_SECRET} 

我在OSX(10.13.1)上运行Docker版本17.09.0-ce,编译afdb6d4。

drone_agent中的本地时间与主机时间非常不同。 这会导致构build我的应用程序时AWS API调用失败。 它抛出这个错误。 https://forums.aws.amazon.com/thread.jspa?threadID=103764# 。 我尝试logging应用程序内的当前时间来validation时间差异。

是否有一个configuration与docker代理同步主机时间?

正如您已经指出的那样,这不是一个Drone.io问题,而是底层虚拟机运行docker时钟变得不同步的问题。

这可以通过按照您链接到的问题中列出的步骤来解决。