gpt4 book ai didi

docker - Docker构建花费太长时间

转载 作者:行者123 更新时间:2023-12-02 20:52:20 24 4
gpt4 key购买 nike

我的Dockerfile中的某些指令花费的时间太长。例如,使用ADD指令添加3行文件或将行回显到文件中有时需要一分钟以上的时间。
是什么原因造成的?
这是我的系统日志,不确定是否相关:

May 29 18:45:17 mymachine kernel: [97813.649053] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: discard
May 29 18:45:54 mymachine kernel: [97850.627286] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: discard
May 29 18:45:55 mymachine kernel: [97851.249484] EXT4-fs (dm-4): mounted filesystem with ordered data mode. Opts: discard
May 29 18:46:34 mymachine console-kit-daemon[983]: GLib-CRITICAL: Source ID 5102 was not found when attempting to remove it
May 29 18:46:53 mymachine kernel: [97908.977215] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: discard
May 29 18:46:53 mymachine kernel: [97909.217137] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: discard
May 29 18:46:53 mymachine kernel: [97909.247252] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: discard
May 29 18:47:26 mymachine kernel: [97942.607378] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: discard
May 29 18:47:26 mymachine kernel: [97942.767831] EXT4-fs (dm-4): mounted filesystem with ordered data mode. Opts: discard
May 29 18:48:36 mymachine kernel: [98012.632630] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: discard
May 29 18:48:37 mymachine kernel: [98013.681835] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: discard
May 29 18:48:38 mymachine kernel: [98014.009612] netlink: 1 bytes leftover after parsing attributes.
May 29 18:48:38 mymachine kernel: [98014.016816] device vethb49f entered promiscuous mode
May 29 18:48:38 mymachine kernel: [98014.020408] IPv6: ADDRCONF(NETDEV_UP): vethb49f: link is not ready
May 29 18:48:38 mymachine kernel: [98014.046745] IPv6: ADDRCONF(NETDEV_CHANGE): vethb49f: link becomes ready
May 29 18:48:38 mymachine kernel: [98014.046785] docker0: port 2(vethb49f) entered forwarding state
May 29 18:48:38 mymachine kernel: [98014.046791] docker0: port 2(vethb49f) entered forwarding state
May 29 18:48:39 mymachine kernel: [98015.128850] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: discard
May 29 18:48:39 mymachine kernel: [98015.174370] docker0: port 2(vethb49f) entered disabled state
May 29 18:48:39 mymachine kernel: [98015.174860] device vethb49f left promiscuous mode
May 29 18:48:39 mymachine kernel: [98015.174867] docker0: port 2(vethb49f) entered disabled state
May 29 18:49:18 mymachine kernel: [98054.703978] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: discard
May 29 18:49:18 mymachine kernel: [98054.834326] EXT4-fs (dm-4): mounted filesystem with ordered data mode. Opts: discard
May 29 18:50:14 mymachine kernel: [98110.408736] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: discard
May 29 18:50:15 mymachine kernel: [98111.221056] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: discard
May 29 18:50:15 mymachine kernel: [98111.443577] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: discard
May 29 18:50:44 mymachine kernel: [98140.675447] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: discard
May 29 18:50:44 mymachine kernel: [98140.695348] EXT4-fs (dm-4): mounted filesystem with ordered data mode. Opts: discard
May 29 18:51:36 mymachine kernel: [98192.027431] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: discard
May 29 18:51:36 mymachine kernel: [98192.559271] EXT4-fs (dm-2): mounted filesystem with ordered data mode. Opts: discard
May 29 18:51:36 mymachine kernel: [98192.800718] netlink: 1 bytes leftover after parsing attributes.
May 29 18:51:36 mymachine kernel: [98192.881484] device veth000f entered promiscuous mode
May 29 18:51:36 mymachine kernel: [98192.881966] IPv6: ADDRCONF(NETDEV_UP): veth000f: link is not ready
May 29 18:51:36 mymachine kernel: [98192.945999] IPv6: ADDRCONF(NETDEV_CHANGE): veth000f: link becomes ready
May 29 18:51:36 mymachine kernel: [98192.946045] docker0: port 2(veth000f) entered forwarding state
May 29 18:51:36 mymachine kernel: [98192.946051] docker0: port 2(veth000f) entered forwarding state
May 29 18:51:37 mymachine kernel: [98193.274007] docker0: port 2(veth000f) entered disabled state
May 29 18:51:37 mymachine kernel: [98193.275061] device veth000f left promiscuous mode
May 29 18:51:37 mymachine kernel: [98193.275068] docker0: port 2(veth000f) entered disabled state
May 29 18:51:37 mymachine kernel: [98193.319695] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: discard
May 29 18:52:17 mymachine kernel: [98233.520926] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: discard
May 29 18:52:17 mymachine kernel: [98233.608787] EXT4-fs (dm-4): mounted filesystem with ordered data mode. Opts: discard
Docker信息:
Containers: 2
Images: 172
Storage Driver: devicemapper
Pool Name: docker-202:1-1447309-pool
Data file: /var/lib/docker/devicemapper/devicemapper/data
Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
Data Space Used: 4443.4 Mb
Data Space Total: 102400.0 Mb
Metadata Space Used: 9.4 Mb
Metadata Space Total: 2048.0 Mb
Execution Driver: native-0.2
Kernel Version: 3.13.0-24-generic
WARNING: No swap limit support

最佳答案

您正在运行哪个Docker后端? AUFS?设备映射器? btrfs? ...?

如果您的操作系统支持,请切换到AUFS后端,这可能会有所帮助。

更具权威性的答案将需要知道您使用的是哪个后端,所使用系统的性能特征,以及其调用的踪迹(例如sysdig可以生成的内容)。

关于docker - Docker构建花费太长时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23943691/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com