Docker:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
第306行: 第306行:
* Back-off restarting failed container
* Back-off restarting failed container
: 实例事件中一直出现Back-off restarting failed container的Warning事件,一般是由于通过指定的镜像启动容器后,容器内部没有常驻进程,导致容器启动成功后即退出,从而进行了持续的重启。
: 实例事件中一直出现Back-off restarting failed container的Warning事件,一般是由于通过指定的镜像启动容器后,容器内部没有常驻进程,导致容器启动成功后即退出,从而进行了持续的重启。
== 日志 ==
{{Shc_out|<syntaxhighlight lang="bash">
sudo docker container ls -all</syntaxhighlight>|<syntaxhighlight lang="bash">
CONTAINER ID        IMAGE              COMMAND                  CREATED            STATUS                    PORTS              NAMES
8edadee2b3f8        mysql:8.0          "docker-entrypoint..."  8 minutes ago      Exited (1) 8 minutes ago                      mysql-80
</syntaxhighlight>|$|/home/kangkk}}
查看容器启动日志。
{{Shc_out|<syntaxhighlight lang="bash">
sudo docker logs 8edadee2b3f8</syntaxhighlight>|<syntaxhighlight lang="bash">
2022-04-12 10:53:59+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.28-1debian10 started.
2022-04-12 10:53:59+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-04-12 10:53:59+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.28-1debian10 started.
2022-04-12 10:53:59+00:00 [Note] [Entrypoint]: Initializing database files
2022-04-12T10:53:59.297045Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2022-04-12T10:53:59.297139Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.28) initializing of server in progress as process 41
2022-04-12T10:53:59.299423Z 0 [ERROR] [MY-010187] [Server] Could not open file '/var/log/mysql/error.log' for error logging: Permission denied
2022-04-12T10:53:59.299477Z 0 [ERROR] [MY-013236] [Server] The designated data directory /usr/mysql/data/ is unusable. You can remove all files that the server added to it.
2022-04-12T10:53:59.299488Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-04-12T10:53:59.299628Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.28)  MySQL Community Server - GPL.
</syntaxhighlight>|$|/home/kangkk}}


== 存储空间映射 ==
== 存储空间映射 ==