Docker ntpdate Permition error
After building a Dockerfile, I run it. I figure out that there is something wrong with local time.
So I start to install ntpdate but it doesn't work at all. The clock of docker must be asyncronized with
host clock, it can not be changed by itself. The file /etc/localtime is used for setting the system clock
and once it is changed, the time in system will be changed immediately.
Actually, /etc/localtime is a symlink to /usr/share/zoneinfo/localtime in some Linux/Unix systems.
We can can change /etc/lcoaltime into any one of these timezones as following:
root@ubuntu:/usr/share/zoneinfo# ls
Africa Canada EST GMT0 Iran MET Poland ROK WET
America CET EST5EDT GMT-0 iso3166.tab Mexico Portugal Singapore W-SU
Antarctica Chile Etc GMT+0 Israel MST posix SystemV zone.tab
Arctic CST6CDT Europe Greenwich Jamaica MST7MDT posixrules Turkey Zulu
Asia Cuba Factory Hongkong Japan Navajo PRC UCT
Atlantic EET GB HST Kwajalein NZ PST8PDT Universal
Australia Egypt GB-Eire Iceland Libya NZ-CHAT right US
Brazil Eire GMT Indian localtime Pacific ROC UTC
Solution:
root@6fc515dfb754:~# ntpdate us.pool.ntp.org
3 Nov 09:30:06 ntpdate[966]: Can't adjust the time of day: Operation not permitted cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
Docker ntpdate Permition error的更多相关文章
- docker 错误:Error response from daemon: cannot stop container: connect: connection refused": unknown
docker 错误:Error response from daemon: cannot stop container: 795e4102b2de: Cannot kill container 795 ...
- Docker 报错 error during connect: Get pipe/docker_engine: The system cannot find the file specified. - 摘要: 本文讲的是Docker 报错 error during connect: Get pipe/dock
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/version: open //./pipe/docker_ ...
- 解决 docker 报错: Error starting daemon: error initializing graphdriver: backing file system is unsupported for this graph driver
CentOS 7.5 x64下 sudo yum install docker -y systemctl enable docker systemctl start docker 发现启动失败 jou ...
- Docker 启动遇到 Error starting daemon: Error initializing network controller 错误
docker 版本 1.10.3 一台装有 docker 的机器重启后,没法启动,/var/log/messages 展示如下错误信息: May 17 11:11:14 gziba-hc03 syst ...
- 私有Docker仓库login Error response from daemon: Get https://x.x.x.x/v2/: dial tcp x.x.x.x:443: connect: connection refused
一.登陆私有仓库错误: docker login --username=evan 192.168.0.203 Error response from daemon: Get https://192.1 ...
- 解决docker启动错误 error creating overlay mount to /var/lib/docker/overlay2
原文 最近在centos7.1使用docker运行redis镜像,出现下面的错误: /usr/bin/docker-current: Error response from daemon: error ...
- 解决docker pull出现 error pulling image configuration: Get https://dseasb33srnrn.cloudfront.net······: net/http: TLS handshake timeout的问题
[root@MyCentos7 var]# docker pull javaUsing default tag: latestTrying to pull repository docker.io/l ...
- docker 报错 Error response from daemon: driver failed programming external connectivity on endpoint mynginx
Error response from daemon: driver failed programming external connectivity on endpoint mynginx (7d1 ...
- docker build提示error checking context:can't stat xxx
现象描述 使用docker build一个镜像的时候,提示下面的错误: ➜ docker build -t image_name -f xxx.dockerfile . error checking ...
随机推荐
- jquery指index
$(selector).index(element) 获得元素相对于选择器的 index 位置.<ul> <li><a href="#nogo" ...
- selenium—八种定位方法
find_element_by_id() find_element_by_name() find_element_by_class_name() find_element_by_tag_name() ...
- Ubuntu 安装 mysql 并修改数据库目录
. . . . . 今天折腾了一下午的时间,恢复了无数次虚拟机快照,终于在 Ubuntu 上把 mysql 安装好了. mysql 是从官网下载的:mysql-server_5.7.16-1ubunt ...
- Android 获取当前时间问题1
获取的写法如下: Calendar c = Calendar.getInstance();//可以对每个时间域单独修改 int year = c.get(Calendar.YEAR); int mon ...
- KMP匹配算法
先来说一下回溯法匹配字符串: 对于主字符串有一个target_index,以target_index(不动)为起点,匹配字符串pattern的长度+target_index为终点,逐个进行比较,当发现 ...
- NSDate和NSString相互转换
一.NSDate转NSString //获取系统当前时间 NSDate *currentDate = [NSDate date]; //用于格式化NSDate对象 NSDateFormatter *d ...
- [刘阳Java]_MyBatis_映射文件的常用标签总结_第5讲
MyBatis中常用标签的总结,简单给出自己的总结 MyBatis映射文件中的标签使用介绍1.<select>:用于编写查询语句用的标签 id:表示当前<select>标签的唯 ...
- des加密解密——java加密,php解密
最近在做项目中,遇到des加密解密的问题. 场景是安卓app端用des加密,php这边需要解密.之前没有接触过des这种加密解密算法,但想着肯定会有demo.因此百度,搜了代码来用.网上代码也是鱼龙混 ...
- Zxing兼容2.3等低版本
需要修改的地方 1.InactivityTimer.java public synchronized void onActivity() { ... if (Build.VERSION.SDK_INT ...
- 我的Git使用-资料查询,名博笔记
1.首先您要知道什么是GIT 2.然后对其GIT的历史有所了解(吹牛b的时候用得着,如果还不知道 linux 脱袜子 Linus Torvalds o(︶︿︶)o ) Git 常用资料查询站点. 官 ...