Docker runs ACTIVEMQ, log time and container time as follows:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/77/F4/wKioL1ZyPt-S8Yg9AAMaJK5fMJk997.png "title=" amq_ Time.png "alt=" Wkiol1zypt-s8yg9aamajk5fmjk997.png "/>d me to execute the date command a few minutes, from time to find the exact difference of 8 hours, suspected or time zone reasons.
2. Doubts
A friend said that the host's/etc/locatime mounted in the container will resolve the problem. But the result is still.
3. Inquire about the information, ask the great God, get the result
Before the Java app starts, add the parameter-duser.timezone=gmt+08
4. My Java application is ACTIVEMQ Message Queuing, editing ACTIVEMQ startup scripts
vi/opt/activemq/bin/activemq# uncomment to enable audit loggingactivemq_opts= "$ACTIVEMQ _opts- Dorg.apache.activemq.audit=true-dfile.encoding=utf8-duser.timezone=gmt+08 "
Finally, thanks for the help of the great God.
This article from the "Do not ask for the best, only better" blog, please be sure to keep this source http://yujianglei.blog.51cto.com/7215578/1725620
Docker runs Java applications, application log time and container time inconsistencies