docker中的crontab,重启之后没了怎么办

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了docker中的crontab,重启之后没了怎么办相关的知识,希望对你有一定的参考价值。

参考技术A docker启动mysql(转)
cs202@cs202-devbox:~$ sudo docker run -d mysql
7698fdd7a2d05d38cf19c60cc9e35c1117fc551ae5e319144947154f4f353d23
cs202@cs202-devbox:~$ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
257646e19a08 ubuntu "/bin/bash" 26 minutes ago Up 13 minutes desperate_ardinghelli
cs202@cs202-devbox:~$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7698fdd7a2d0 mysql "/entrypoint.sh mysql" 18 seconds ago Exited (1) 17 seconds ago desperate_swanson
151a8113ba67 mysql "/entrypoint.sh mysql" 5 minutes ago Exited (1) 5 minutes ago hopeful_williams
257646e19a08 ubuntu "/bin/bash" 27 minutes ago Up 13 minutes desperate_ardinghelli
发现并没有成功启动,查看日志:
cs202@cs202-devbox:~$ sudo docker logs desperate_swanson
error: database is uninitialized and password option is not specified
You need to specify one of MYSQL_ROOT_PASSWORD, MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD

于是设置MYSQL_ROOT_PASSWORD:
sudo docker run -e MYSQL_ROOT_PASSWORD=wwwwww --name mysql -d mysql
总算启动成功了:
^Ccs202@cs202-devbox:~sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b50461bd8135 mysql "/entrypoint.sh mysql" 4 minutes ago Up 4 minutes 3306/tcp mysql
257646e19a08 ubuntu "/bin/bash" 37 minutes ago Up 23 minutes desperate_ardinghelli
cs202@cs202-devbox:~$
后台打印出大片日志:
cs202@cs202-devbox:~$ sudo docker logs -f mysql
2016-03-12T02:50:26.302319Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2016-03-12T02:50:26.375013Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2016-03-12T02:50:26.375515Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2016-03-12T02:50:26.444508Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2016-03-12T02:50:26.446893Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2016-03-12T02:50:26.447017Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2016-03-12T02:50:26.451067Z 0 [Note] InnoDB: Waiting for purge to start
2016-03-12T02:50:26.504451Z 0 [Note] InnoDB: 5.7.11 started; log sequence number 11991512
2016-03-12T02:50:26.505028Z 0 [Note] Plugin 'FEDERATED' is disabled.
2016-03-12T02:50:26.508912Z 0 [Warning] Failed to set up SSL because of the following SSL library error: SSL context is not usable without certificate and private key
2016-03-12T02:50:26.509170Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
2016-03-12T02:50:26.509310Z 0 [Note] IPv6 is available.
2016-03-12T02:50:26.509366Z 0 [Note] - '::' resolves to '::';
2016-03-12T02:50:26.509419Z 0 [Note] Server socket created on IP: '::'.
2016-03-12T02:50:26.509154Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2016-03-12T02:50:26.519321Z 0 [Warning] 'db' entry 'sys mysql.sys@localhost' ignored in --skip-name-resolve mode.
2016-03-12T02:50:26.519569Z 0 [Warning] 'proxies_priv' entry '@ root@localhost' ignored in --skip-name-resolve mode.
2016-03-12T02:50:26.544083Z 0 [Note] InnoDB: Buffer pool(s) load completed at 160312 2:50:26
2016-03-12T02:50:26.548848Z 0 [Warning] 'tables_priv' entry 'sys_config mysql.sys@localhost' ignored in --skip-name-resolve mode.
2016-03-12T02:50:26.565564Z 0 [Note] Event Scheduler: Loaded 0 events
2016-03-12T02:50:26.566266Z 0 [Note] mysqld: ready for connections.
Version: '5.7.11' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server (GPL)

win10的电脑重启更新,然后usb接口没有反映了,蓝牙也没了,怎么办?

建议安装百度卫士,检测系统是否有病毒侵入,导致无法识别USB。不是的话,可以从新安装USB驱动。
1、逐步的点击并打开击“控制面板”、“管理工具”和“服务”等选项卡;
2、将Plug
and
Play服务开启使用;
3、如果Plug
and
Play服务是默认开启的,那么首先要禁止,接着再次重新开启;
4、接着将设备管理器打开,将Unknown
Device设备卸载了,然后将无线设备拔出去。等到电脑重启之后再插到电脑上,重新安装一下驱动就可以解决了。
参考技术A 可以从新安装usb驱动。
1、逐步的点击并打开击“控制面板”、“管理工具”和“服务”等选项卡;
2、将plug
and
play服务开启使用;
3、如果plug
and
play服务是默认开启的,那么首先要禁止,接着再次重新开启;
4、接着将设备管理器打开,将unknown
device设备卸载了,然后将无线设备拔出去。等到电脑重启之后再插到电脑上,重新安装一下驱动就可以解决了。
参考技术B USB驱动没装,下载驱动人生或其他驱动软件装驱动就好

以上是关于docker中的crontab,重启之后没了怎么办的主要内容,如果未能解决你的问题,请参考以下文章

电脑重启之后文件丢失怎么办?

安装DAEMON时提示要重启,重启之后还是提示要重启~~怎么办~~装不了

docker 容器挂掉后 怎么自动重启

docker 容器挂掉后 怎么自动重启

Ubuntu中怎么启用Crontab日志记录

Ubuntu中怎么启用Crontab日志记录