diff --git "a/content/zh/docs/Container/\344\275\277\347\224\250\346\214\207\345\215\227.md" "b/content/zh/docs/Container/\344\275\277\347\224\250\346\214\207\345\215\227.md" index e8cbf28c8351d3c0d56afefed56b2c94a955184b..204d1b97fd50e5fbcfe66866410676bff526c889 100644 --- "a/content/zh/docs/Container/\344\275\277\347\224\250\346\214\207\345\215\227.md" +++ "b/content/zh/docs/Container/\344\275\277\347\224\250\346\214\207\345\215\227.md" @@ -1,6 +1,8 @@ # 使用指南 本章介绍iSula容器引擎的使用方法。 +>![](public_sys-resources/icon-note.gif) **说明:** +>iSulad的所有使用操作均需要使用root权限。 - [容器管理](https://openeuler.org/zh/docs/20.03_LTS/docs/Container/%E5%AE%B9%E5%99%A8%E7%AE%A1%E7%90%86.html) @@ -13,4 +15,4 @@ - [查询信息](https://openeuler.org/zh/docs/20.03_LTS/docs/Container/%E6%9F%A5%E8%AF%A2%E4%BF%A1%E6%81%AF.html) - [安全特性](https://openeuler.org/zh/docs/20.03_LTS/docs/Container/%E5%AE%89%E5%85%A8%E7%89%B9%E6%80%A7.html) - [支持OCI hooks](https://openeuler.org/zh/docs/20.03_LTS/docs/Container/%E6%94%AF%E6%8C%81OCI-hooks.html) - \ No newline at end of file + diff --git "a/content/zh/docs/Container/\345\215\207\347\272\247.md" "b/content/zh/docs/Container/\345\215\207\347\272\247.md" index b20a30163d1b06e7c510eb4e750ae026d943fb52..b9ffd7f394b64640a1b98cd2461ad41a4fdb2fa1 100644 --- "a/content/zh/docs/Container/\345\215\207\347\272\247.md" +++ "b/content/zh/docs/Container/\345\215\207\347\272\247.md" @@ -3,7 +3,7 @@ - 若为相同大版本之间的升级,例如从2.x.x版本升级到2.x.x版本,请执行如下命令: ``` - $ sudo yum update -y iSulad + # sudo yum update -y iSulad ``` - 若为不同大版本之间的升级,例如从1.x.x版本升级到2.x.x版本,请先保存当前的配置文件/etc/isulad/daemon.json,并卸载已安装的iSulad软件包,然后安装待升级的iSulad软件包,随后恢复配置文件。 @@ -12,10 +12,10 @@ >- 可通过** sudo rpm -qa |grep iSulad** 或 **isula version** 命令确认当前iSulad的版本号。 >- 相同大版本之间,如果希望手动升级,请下载iSulad及其所有依赖库的RPM包进行升级,参考命令如下: > ``` -> $ sudo rpm -Uhv iSulad-xx.xx.xx-YYYYmmdd.HHMMSS.gitxxxxxxxx.aarch64.rpm +> # sudo rpm -Uhv iSulad-xx.xx.xx-YYYYmmdd.HHMMSS.gitxxxxxxxx.aarch64.rpm > ``` > 若升级失败,可通过--force选项进行强制升级,参考命令如下: > ``` -> $ sudo rpm -Uhv --force iSulad-xx.xx.xx-YYYYmmdd.HHMMSS.gitxxxxxxxx.aarch64.rpm +> # sudo rpm -Uhv --force iSulad-xx.xx.xx-YYYYmmdd.HHMMSS.gitxxxxxxxx.aarch64.rpm > ``` diff --git "a/content/zh/docs/Container/\345\215\270\350\275\275.md" "b/content/zh/docs/Container/\345\215\270\350\275\275.md" index 411fa3d2221332b3f6d3ce01914cf66b48852686..19245cfdbfeb03114d28661888e735a99ef88763 100644 --- "a/content/zh/docs/Container/\345\215\270\350\275\275.md" +++ "b/content/zh/docs/Container/\345\215\270\350\275\275.md" @@ -6,19 +6,19 @@ - 若使用yum方式安装,卸载的参考命令如下: ``` - $ sudo yum remove iSulad + # yum remove iSulad ``` - 若使用rpm方式安装,需卸载iSulad及其依赖包,卸载单个RPM包的参考命令如下: ``` - sudo rpm -e iSulad-xx.xx.xx-YYYYmmdd.HHMMSS.gitxxxxxxxx.aarch64.rpm + # rpm -e iSulad-xx.xx.xx-YYYYmmdd.HHMMSS.gitxxxxxxxx.aarch64.rpm ``` 2. 镜像、容器、volumes以及相关配置文件不会自动删除,需要手动删除。参考命令如下: ``` - $ sudo rm -rf /var/lib/iSulad + # rm -rf /var/lib/iSulad ``` diff --git "a/content/zh/docs/Container/\345\256\211\350\243\205\344\270\216\351\205\215\347\275\256.md" "b/content/zh/docs/Container/\345\256\211\350\243\205\344\270\216\351\205\215\347\275\256.md" index 6f315f673fa291227b84eed1e20b8a676556b757..ba1a4f3a5434cc5ca2b683eae10c1f446cf03b3a 100644 --- "a/content/zh/docs/Container/\345\256\211\350\243\205\344\270\216\351\205\215\347\275\256.md" +++ "b/content/zh/docs/Container/\345\256\211\350\243\205\344\270\216\351\205\215\347\275\256.md" @@ -1,4 +1,7 @@ # 安装与配置 +本章介绍iSulad的安装、安装后配置,以及升级和卸载的方法。 +>![](public_sys-resources/icon-note.gif) **说明:** +>iSulad的安装、升级、卸载均需要使用root权限。 - [安装与配置](#安装与配置) @@ -17,19 +20,19 @@ iSulad可以通过yum或rpm命令两种方式安装,由于yum会自动安装 - (推荐)使用yum安装iSulad,参考命令如下: ``` - $ sudo yum install -y iSulad + # sudo yum install -y iSulad ``` - 使用rpm安装iSulad,需要下载iSulad及其所有依赖库的RPM包,然后手动安装。安装单个iSulad的RPM包(依赖包安装方式相同),参考命令如下: ``` - $ sudo rpm -ihv iSulad-xx.xx.xx-YYYYmmdd.HHMMSS.gitxxxxxxxx.aarch64.rpm + # sudo rpm -ihv iSulad-xx.xx.xx-YYYYmmdd.HHMMSS.gitxxxxxxxx.aarch64.rpm ``` ``` - $ isulad -l DEBUG + # isulad -l DEBUG ``` ## 配置方法 @@ -48,7 +51,7 @@ iSulad 安装完成后,可以根据需要进行相关配置。 在启动服务的时候,直接通过命令行进行配置。其配置选项可通过以下命令查阅: ``` - $ isulad --help + # isulad --help lightweight container runtime daemon Usage: isulad [global options] @@ -95,7 +98,7 @@ iSulad 安装完成后,可以根据需要进行相关配置。 示例: 启动isulad,并将日志级别调整成DEBUG ``` - $ isulad -l DEBUG + # isulad -l DEBUG ``` @@ -446,7 +449,7 @@ iSulad 安装完成后,可以根据需要进行相关配置。 示例: ``` - $ cat /etc/isulad/daemon.json + # cat /etc/isulad/daemon.json { "group": "isulad", "default-runtime": "lcr", diff --git "a/content/zh/docs/Container/\345\256\271\345\231\250\347\256\241\347\220\206.md" "b/content/zh/docs/Container/\345\256\271\345\231\250\347\256\241\347\220\206.md" index ad540496beb8b11f1876b284cbe63ebcc5c2821f..66d302f6d978f67e43b6e734657201d0a2b74b11 100644 --- "a/content/zh/docs/Container/\345\256\271\345\231\250\347\256\241\347\220\206.md" +++ "b/content/zh/docs/Container/\345\256\271\345\231\250\347\256\241\347\220\206.md" @@ -325,9 +325,9 @@ create命令支持参数参考下表。 创建一个新容器 ``` -$ isula create busybox +# isula create busybox fd7376591a9c3d8ee9a14f5d2c2e5255b02cc44cddaabca82170efd4497510e1 -$ isula ps -a +# isula ps -a STATUS PID IMAGE COMMAND EXIT_CODE RESTART_COUNT STARTAT FINISHAT RUNTIME ID NAMES inited - busybox "sh" 0 0 - - lcr fd7376591a9c fd7376591a9c4521... ``` @@ -377,7 +377,7 @@ start命令支持参数参考下表。 启动一个新容器 ``` -$ isula start fd7376591a9c3d8ee9a14f5d2c2e5255b02cc44cddaabca82170efd4497510e1 +# isula start fd7376591a9c3d8ee9a14f5d2c2e5255b02cc44cddaabca82170efd4497510e1 ``` ## 运行容器 @@ -688,11 +688,11 @@ run命令支持参数参考下表。 - 禁止使用echo的方式向run命令的stdin输入数据,会导致客户端卡死。应该直接将echo的值作为命令行参数传给容器 ``` - $ echo ls | isula run -i busybox /bin/sh + # echo ls | isula run -i busybox /bin/sh ^C - $ + # ``` 上述命令出现客户端卡死现象,这是由于上述命令相当于往stdin输入ls,随后EOF被读取,客户端不再发送数据,等待服务端退出,但是服务端无法区分客户端是否需要继续发送数据,因而服务端卡在read数据上,最终导致双方均卡死。 @@ -700,7 +700,7 @@ run命令支持参数参考下表。 正确的执行方式为: ``` - $ isula run -i busybox ls + # isula run -i busybox ls bin dev etc @@ -711,7 +711,7 @@ run命令支持参数参考下表。 tmp usr var - $ + # ``` - 使用host的根目录(/)作为容器的文件系统,那么在挂载路径时,如果有如下情况 @@ -758,7 +758,7 @@ run命令支持参数参考下表。 运行一个新容器 ``` -$ isula run -itd busybox +# isula run -itd busybox 9c2c13b6c35f132f49fb7ffad24f9e673a07b7fe9918f97c0591f0d7014c713b ``` @@ -831,7 +831,7 @@ stop命令支持参数参考下表。 停止一个容器 ``` -$ isula stop fd7376591a9c3d8ee9a14f5d2c2e5255b02cc44cddaabca82170efd4497510e1 +# isula stop fd7376591a9c3d8ee9a14f5d2c2e5255b02cc44cddaabca82170efd4497510e1 fd7376591a9c3d8ee9a14f5d2c2e5255b02cc44cddaabca82170efd4497510e1 ``` @@ -881,7 +881,7 @@ kill命令支持参数参考下表。 杀掉一个容器 ``` -$ isula kill fd7376591a9c3d8ee9a14f5d2c2e5255b02cc44cddaabca82170efd4497510e1 +# isula kill fd7376591a9c3d8ee9a14f5d2c2e5255b02cc44cddaabca82170efd4497510e1 fd7376591a9c3d8ee9a14f5d2c2e5255b02cc44cddaabca82170efd4497510e1 ``` @@ -940,7 +940,7 @@ rm命令支持参数参考下表。 删除一个停止状态的容器 ``` -$ isula rm fd7376591a9c3d8ee9a14f5d2c2e5255b02cc44cddaabca82170efd4497510e1 +# isula rm fd7376591a9c3d8ee9a14f5d2c2e5255b02cc44cddaabca82170efd4497510e1 fd7376591a9c3d8ee9a14f5d2c2e5255b02cc44cddaabca82170efd4497510e1 ``` @@ -1000,7 +1000,7 @@ attach命令支持参数参考下表。 接入一个运行状态的容器 ``` -$ isula attach fd7376591a9c3d8ee9a14f5d2c2e5255b02cc44cddaabca82170efd4497510e1 +# isula attach fd7376591a9c3d8ee9a14f5d2c2e5255b02cc44cddaabca82170efd4497510e1 / # / # ``` @@ -1046,7 +1046,7 @@ rename命令支持参数参考下表。 重命名一个容器 ``` -$ isula rename my_container my_new_container +# isula rename my_container my_new_container ``` ## 在容器中执行新命令 @@ -1147,28 +1147,28 @@ exec命令支持参数参考下表。 原因:使用exec 执行ls /test,输出带有换行,针对该输出进行“| grep "xx" | wc -l“,处理结果为2(两行) ``` - $ isula exec -it container ls /test + # isula exec -it container ls /test xx xx10 xx12 xx14 xx3 xx5 xx7 xx9 xx1 xx11 xx13 xx2 xx4 xx6 xx8 - $ + # ``` 建议处理方式:使用run/exec执行带有管道操作的命令时,使用/bin/bash -c 执行命令,在容器中执行管道操作。 ``` - $ isula exec -it container /bin/sh -c "ls /test | grep "xx" | wc -l" + # isula exec -it container /bin/sh -c "ls /test | grep "xx" | wc -l" 15 - $ + # ``` - 禁止使用echo的方式向exec命令的stdin输入数据,会导致客户端卡死。应该直接将echo的值作为命令行参数传给容器 ``` - $ echo ls | isula exec 38 /bin/sh + # echo ls | isula exec 38 /bin/sh ^C - $ + # ``` 上述命令可能出现客户端卡死现象,这是由于上述命令相当于往stdin输入ls,随后EOF被读取,客户端不再发送数据,等待服务端退出,但是服务端无法区分客户端是否需要继续发送数据,因而服务端卡在read数据上,最终导致双方均卡死。 @@ -1176,7 +1176,7 @@ exec命令支持参数参考下表。 正确的执行方式为: ``` - $ isula exec 38 ls + # isula exec 38 ls bin dev etc home proc root sys tmp usr var ``` @@ -1186,7 +1186,7 @@ exec命令支持参数参考下表。 在运行中的容器中,执行echo命令 ``` -$ isula exec c75284634bee echo "hello,world" +# isula exec c75284634bee echo "hello,world" hello,world ``` @@ -1246,7 +1246,7 @@ inspect命令支持参数参考下表。 查询容器信息 ``` -$ isula inspect c75284634bee +# isula inspect c75284634bee [ { "Id": "c75284634beeede3ab86c828790b439d16b6ed8a537550456b1f94eb852c1c0a", @@ -1443,11 +1443,11 @@ ps命令支持参数参考下表。 查询所有容器信息 ``` -$ isula ps -a +# isula ps -a ID IMAGE STATUS PID COMMAND EXIT_CODE RESTART_COUNT STARTAT FINISHAT RUNTIME NAMES e84660aa059c rnd-dockerhub.huawei.com/official/busybox running 304765 "sh" 0 0 13 minutes ago - lcr e84660aa059cafb0a77a4002e65cc9186949132b8e57b7f4d76aa22f28fde016 -$ isula ps -a --format "table {{.ID}} {{.Image}}" --no-trunc +# isula ps -a --format "table {{.ID}} {{.Image}}" --no-trunc ID IMAGE e84660aa059cafb0a77a4002e65cc9186949132b8e57b7f4d76aa22f28fde016 rnd-dockerhub.huawei.com/official/busybox @@ -1516,7 +1516,7 @@ restart命令支持参数参考下表。 重启单个容器 ``` -$ isula restart c75284634beeede3ab86c828790b439d16b6ed8a537550456b1f94eb852c1c0a +# isula restart c75284634beeede3ab86c828790b439d16b6ed8a537550456b1f94eb852c1c0a c75284634beeede3ab86c828790b439d16b6ed8a537550456b1f94eb852c1c0a ``` @@ -1566,7 +1566,7 @@ wait命令支持参数参考下表。 等待单个容器退出 ``` -$ isula wait c75284634beeede3ab86c828790b439d16b6ed8a537550456b1f94eb852c1c0a +# isula wait c75284634beeede3ab86c828790b439d16b6ed8a537550456b1f94eb852c1c0a 137 ``` @@ -1617,7 +1617,7 @@ top命令支持参数参考下表。 查询容器中进程信息 ``` -$ isula top 21fac8bb9ea8e0be4313c8acea765c8b4798b7d06e043bbab99fc20efa72629c +# isula top 21fac8bb9ea8e0be4313c8acea765c8b4798b7d06e043bbab99fc20efa72629c UID PID PPID C STIME TTY TIME CMD root 22166 22163 0 23:04 pts/1 00:00:00 sh ``` @@ -1675,7 +1675,7 @@ stats命令支持参数参考下表。 显示资源使用的统计信息 ``` -$ isula stats --no-stream 21fac8bb9ea8e0be4313c8acea765c8b4798b7d06e043bbab99fc20efa72629c CONTAINER CPU % MEM USAGE / LIMIT MEM % BLOCK I / O PIDS +# isula stats --no-stream 21fac8bb9ea8e0be4313c8acea765c8b4798b7d06e043bbab99fc20efa72629c CONTAINER CPU % MEM USAGE / LIMIT MEM % BLOCK I / O PIDS 21fac8bb9ea8 0.00 56.00 KiB / 7.45 GiB 0.00 0.00 B / 0.00 B 1 ``` @@ -1735,7 +1735,7 @@ logs命令支持参数参考下表。 获取容器日志 ``` -$ isula logs 6a144695f5dae81e22700a8a78fac28b19f8bf40e8827568b3329c7d4f742406 +# isula logs 6a144695f5dae81e22700a8a78fac28b19f8bf40e8827568b3329c7d4f742406 hello, world hello, world hello, world @@ -1783,18 +1783,18 @@ cp命令支持参数参考下表。 - iSulad在执行拷贝时,不会挂载/etc/hostname, /etc/resolv.conf,/etc/hosts三个文件,也不会对--volume和--mount参数传入的参数挂载到host,所以对这些文件的拷贝使用的是镜像中的原始文件,而不是真实容器中的文件。 ``` - $ isula cp b330e9be717a:/etc/hostname /tmp/hostname - $ cat /tmp/hostname - $ + # isula cp b330e9be717a:/etc/hostname /tmp/hostname + # cat /tmp/hostname + # ``` - iSulad在解压文件时,不会对文件系统中即将被覆盖的文件或文件夹做类型判断,而是直接覆盖,所以在拷贝时,如果源为文件夹,同名的文件会被强制覆盖为文件夹;如果源为文件,同名的文件夹会被强制覆盖为文件。 ``` - $ rm -rf /tmp/test_file_to_dir && mkdir /tmp/test_file_to_dir - $ isula exec b330e9be717a /bin/sh -c "rm -rf /tmp/test_file_to_dir && touch /tmp/test_file_to_dir" - $ isula cp b330e9be717a:/tmp/test_file_to_dir /tmp - $ ls -al /tmp | grep test_file_to_dir + # rm -rf /tmp/test_file_to_dir && mkdir /tmp/test_file_to_dir + # isula exec b330e9be717a /bin/sh -c "rm -rf /tmp/test_file_to_dir && touch /tmp/test_file_to_dir" + # isula cp b330e9be717a:/tmp/test_file_to_dir /tmp + # ls -al /tmp | grep test_file_to_dir -rw-r----- 1 root root 0 Apr 26 09:59 test_file_to_dir ``` @@ -1858,7 +1858,7 @@ isula pause CONTAINER [CONTAINER...] 暂停一个正在运行的容器,命令示例如下: ``` -$ isula pause 8fe25506fb5883b74c2457f453a960d1ae27a24ee45cdd78fb7426d2022a8bac +# isula pause 8fe25506fb5883b74c2457f453a960d1ae27a24ee45cdd78fb7426d2022a8bac 8fe25506fb5883b74c2457f453a960d1ae27a24ee45cdd78fb7426d2022a8bac ``` @@ -1903,7 +1903,7 @@ isula unpause CONTAINER [CONTAINER...] 恢复一个被暂停的容器,命令示例如下: ``` -$ isula unpause 8fe25506fb5883b74c2457f453a960d1ae27a24ee45cdd78fb7426d2022a8bac +# isula unpause 8fe25506fb5883b74c2457f453a960d1ae27a24ee45cdd78fb7426d2022a8bac 8fe25506fb5883b74c2457f453a960d1ae27a24ee45cdd78fb7426d2022a8bac ``` @@ -1954,6 +1954,6 @@ isula events [OPTIONS] 从服务端实时获取事件消息,命令示例如下: ``` -$ isula events +# isula events ``` diff --git "a/content/zh/docs/Container/\345\256\271\345\231\250\350\265\204\346\272\220\347\256\241\347\220\206.md" "b/content/zh/docs/Container/\345\256\271\345\231\250\350\265\204\346\272\220\347\256\241\347\220\206.md" index c7220401d32a7792f96b81b08c8272555f8ad557..20223d146e428ef50ec37117298c54a0f9aefedc 100644 --- "a/content/zh/docs/Container/\345\256\271\345\231\250\350\265\204\346\272\220\347\256\241\347\220\206.md" +++ "b/content/zh/docs/Container/\345\256\271\345\231\250\350\265\204\346\272\220\347\256\241\347\220\206.md" @@ -360,7 +360,7 @@ create/run时指定--storage-opt参数。 在isula run/create命令行上通过已有参数“--storage-opt size=”来设置限额。其中value是一个正数,单位可以是\[kKmMgGtTpP\]?\[iI\]?\[bB\]?,在不带单位的时候默认单位是字节。 ``` -$ isula run -ti --storage-opt size=10M busybox +# isula run -ti --storage-opt size=10M busybox / # df -h Filesystem Size Used Available Use% Mounted on overlay 10.0M 48.0K 10.0M 0% / @@ -405,7 +405,7 @@ overlay 10.0M 10.0M 0 100% / 内核必须支持ext4的project quota功能,并在mkfs的时候要加上-O quota,project,挂载的时候要加上-o prjquota。任何一个不满足,在使用--storage-opt size=时都将报错。 ``` - $ isula run -it --storage-opt size=10Mb busybox df -h + # isula run -it --storage-opt size=10Mb busybox df -h Error response from daemon: Failed to prepare rootfs with error: time="2019-04-09T05:13:52-04:00" level=fatal msg="error creating read- write layer with ID "a4c0e55e82c55e4ee4b0f4ee07f80cc2261cf31b2c2dfd628fa1fb00db97270f": --storage-opt is supported only for overlay over xfs or ext4 with 'pquota' mount option" @@ -425,7 +425,7 @@ overlay 10.0M 10.0M 0 100% / docker启动失败。 ``` - $ docker run -itd --storage-opt size=4k rnd-dockerhub.huawei.com/official/ubuntu-arm64:latest + # docker run -itd --storage-opt size=4k rnd-dockerhub.huawei.com/official/ubuntu-arm64:latest docker: Error response from daemon: symlink /proc/mounts /var/lib/docker/overlay2/e6e12701db1a488636c881b44109a807e187b8db51a50015db34a131294fcf70-init/merged/etc/mtab: disk quota exceeded. See 'docker run --help'. ``` @@ -433,9 +433,9 @@ overlay 10.0M 10.0M 0 100% / 轻量级容器不报错,正常启动 ``` - $ isula run -itd --storage-opt size=4k rnd-dockerhub.huawei.com/official/ubuntu-arm64:latest + # isula run -itd --storage-opt size=4k rnd-dockerhub.huawei.com/official/ubuntu-arm64:latest 636480b1fc2cf8ac895f46e77d86439fe2b359a1ff78486ae81c18d089bbd728 - $ isula ps + # isula ps STATUS PID IMAGE COMMAND EXIT_CODE RESTART_COUNT STARTAT FINISHAT RUNTIME ID NAMES running 17609 rnd-dockerhub.huawei.com/official/ubuntu-arm64:latest /bin/bash 0 0 2 seconds ago - lcr 636480b1fc2c 636480b1fc2cf8ac895f46e77d86439fe2b359a1ff78486ae81c18d089bbd728 ``` @@ -447,7 +447,7 @@ overlay 10.0M 10.0M 0 100% / 轻量级容器在启动容器过程中,使用默认配置时,挂载点较少,如/proc,或/sys等路径不存在时,才会创建。用例中的镜像rnd-dockerhub.huawei.com/official/ubuntu-arm64:latest本身含有/proc, /sys等,因此整个启动容器的过程中,都不会有新文件或路径生成,故轻量级容器启动过程不会报错。为验证这一过程,当把镜像替换为rnd-dockerhub.huawei.com/official/busybox-aarch64:latest时,由于该镜像内无/proc存在,轻量级容器启动一样会报错。 ``` - $ isula run -itd --storage-opt size=4k rnd-dockerhub.huawei.com/official/busybox-aarch64:latest + # isula run -itd --storage-opt size=4k rnd-dockerhub.huawei.com/official/busybox-aarch64:latest 8e893ab483310350b8caa3b29eca7cd3c94eae55b48bfc82b350b30b17a0aaf4 Error response from daemon: Start container error: runtime error: 8e893ab483310350b8caa3b29eca7cd3c94eae55b48bfc82b350b30b17a0aaf4:tools/lxc_start.c:main:404 starting container process caused "Failed to setup lxc, please check the config file." @@ -512,7 +512,7 @@ isula run -ti --files-limit 1024 busybox bash 1. 使用--files-limit参数传入一个很小的值,如1,可能导致容器启动失败。 ``` - $ isula run -itd --files-limit 1 rnd-dockerhub.huawei.com/official/busybox-aarch64 + # isula run -itd --files-limit 1 rnd-dockerhub.huawei.com/official/busybox-aarch64 004858d9f9ef429b624f3d20f8ba12acfbc8a15bb121c4036de4e5745932eff4 Error response from daemon: Start container error: Container is not running:004858d9f9ef429b624f3d20f8ba12acfbc8a15bb121c4036de4e5745932eff4 ``` @@ -520,9 +520,9 @@ isula run -ti --files-limit 1024 busybox bash 而docker会启动成功,其files.limit cgroup值为max。 ``` - $ docker run -itd --files-limit 1 rnd-dockerhub.huawei.com/official/busybox-aarch64 + # docker run -itd --files-limit 1 rnd-dockerhub.huawei.com/official/busybox-aarch64 ef9694bf4d8e803a1c7de5c17f5d829db409e41a530a245edc2e5367708dbbab - $ docker exec -it ef96 cat /sys/fs/cgroup/files/files.limit + # docker exec -it ef96 cat /sys/fs/cgroup/files/files.limit max ``` diff --git "a/content/zh/docs/Container/\346\237\245\350\257\242\344\277\241\346\201\257.md" "b/content/zh/docs/Container/\346\237\245\350\257\242\344\277\241\346\201\257.md" index 2a4d91e725c0c74d81016a5f01e053fed7bcba42..fddae0709411837346affd94183049ac842a17a0 100644 --- "a/content/zh/docs/Container/\346\237\245\350\257\242\344\277\241\346\201\257.md" +++ "b/content/zh/docs/Container/\346\237\245\350\257\242\344\277\241\346\201\257.md" @@ -74,7 +74,7 @@ isula info 查询系统级信息,可以展示容器数目,镜像数目,内核版本、操作系统等信息 ``` -$ isula info +# isula info Containers: 2 Running: 0 Paused: 0