Docker-compose 在 macOS 10.15.2 Beta (19C39d) Catalina 更新后无法启动

Docker-compose failing to start after macOS 10.15.2 Beta (19C39d) Catalina update

尝试 运行 我的 docker-compose 在将我的 macOS 升级到 Catalina 10.15.2 Beta (19C39d) 的最新测试版后,但我无法这样做。

如果有人有更好的体验,请分享您的修复,因为我很确定我的 docker-compose 在更新之前可以正常工作。

系统信息

运行 docker system info

Client:
 Debug Mode: false

Server:
 Containers: 3
  Running: 0
  Paused: 0
  Stopped: 3
 Images: 37
 Server Version: 19.03.4
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: b34a5c8af56e510852c35414db4c1f4fa6172339
 runc version: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.9.184-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 6
 Total Memory: 1.952GiB
 Name: docker-desktop
 ID: GY6V:NEYP:UYIY:SYOL:ZFWA:CNCY:NVMK:PWYA:MQPQ:AJTS:IDLM:3FWE
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 35
  Goroutines: 50
  System Time: 2019-11-15T22:25:09.226536684Z
  EventsListeners: 2
 HTTP Proxy: gateway.docker.internal:3128
 HTTPS Proxy: gateway.docker.internal:3129
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

来自我的错误日志 console:

我能够在我的机器上使用 console 找到一些错误,看起来像这样 com.apple.AppKit

Unable to simultaneously satisfy constraints:
(
    "<NSLayoutConstraint:0x6000000211d0 V:|-(20)-[NSScrollView:0x7f865980fc00]   (active, names: '|':NSView:0x7f8657520090 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x60000002d2c0 h=-&- v=-&- NSClipView:0x7f8657520710.minY == 1   (active, names: '|':NSScrollView:0x7f865980fc00 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x60000002d310 h=-&- v=-&- V:[NSClipView:0x7f8657520710]-(1)-|   (active, names: '|':NSScrollView:0x7f865980fc00 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x60000002d1d0 h=-&- v=-&- V:[Docker.TextView:0x7f8657520a20]-(321)-|   (active, names: '|':NSClipView:0x7f8657520710 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x60000002d180 h=-&- v=-&- Docker.TextView:0x7f8657520a20.minY == 0   (active, names: '|':NSClipView:0x7f8657520710 )>",
    "<NSLayoutConstraint:0x600000021360 V:|-(20)-[Docker.TextViewInView:0x7f86577c81b0]   (active, names: '|':NSView:0x7f8657520090 )>",
    "<NSLayoutConstraint:0x600000021b30 NSView:0x7f86575202f0.bottom == NSScrollView:0x7f865980fc00.bottom + 7   (active)>",
    "<NSLayoutConstraint:0x600000020f50 NSTextField:0x7f86577cb4a0.height == 21   (active)>",
    "<NSLayoutConstraint:0x6000000215e0 V:[Docker.TextViewInView:0x7f86577c8450]-(14)-[NSTextField:0x7f86577cb4a0]   (active)>",
    "<NSLayoutConstraint:0x600000021860 V:[NSTextField:0x7f86577cb4a0]-(20)-[NSButton:0x7f86577cbd40'Report an issue']   (active)>",
    "<NSLayoutConstraint:0x600000020aa0 Docker.TextViewInView:0x7f86577c8450.height == 85   (active)>",
    "<NSLayoutConstraint:0x600000020ff0 NSButton:0x7f86577cbd40'Report an issue'.height == 21   (active)>",
    "<NSLayoutConstraint:0x600000021400 V:[Docker.TextViewInView:0x7f86577c81b0]-(20)-[Docker.TextViewInView:0x7f86577c8450]   (active)>",
    "<NSLayoutConstraint:0x6000000677a0 Docker.TextViewInView:0x7f86577c81b0.height == 34   (active)>",
    "<NSLayoutConstraint:0x6000000219f0 V:[NSButton:0x7f86577cbd40'Report an issue']-(20)-[NSView:0x7f86575202f0]   (active)>",
    "<NSLayoutConstraint:0x600000051a40 NSView:0x7f86575202f0.height == 32   (active)>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x600000020aa0 Docker.TextViewInView:0x7f86577c8450.height == 85   (active)>

Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens.  And/or, set a symbolic breakpoint on LAYOUT_CONSTRAINTS_NOT_SATISFIABLE to catch this in the debugger.

同时出现如下错误:

default 16:45:28.317339-0600    Docker  boringssl_session_handshake_incomplete(191) [C7.1:2][0x7f865be00ce0] Early handshake return caused by SSL_ERROR_WANT_READ [2]
default 16:45:28.317361-0600    Docker  boringssl_session_handshake_incomplete(191) [C7.1:2][0x7f865be00ce0] Early handshake return caused by SSL_ERROR_WANT_READ [2]
default 16:45:28.383430-0600    Docker  boringssl_session_handshake_incomplete(191) [C7.1:2][0x7f865be00ce0] Early handshake return caused by SSL_ERROR_WANT_READ [2]
default 16:45:28.383903-0600    Docker  boringssl_session_handshake_incomplete(191) [C7.1:2][0x7f865be00ce0] Early handshake return caused by SSL_ERROR_WANT_CERTIFICATE_VERIFY [16]
default 16:45:28.456181-0600    Docker  boringssl_session_handshake_incomplete(191) [C7.1:2][0x7f865be00ce0] Early handshake return caused by SSL_ERROR_WANT_READ [2]
default 16:45:28.456197-0600    Docker  boringssl_session_handshake_incomplete(191) [C7.1:2][0x7f865be00ce0] Early handshake return caused by SSL_ERROR_WANT_READ [2]
default 16:45:51.405194-0600    com.docker.hyperkit [    2.316084] i8042: probe of i8042 failed with error -5
default 16:45:51.408830-0600    com.docker.hyperkit [    2.319402] ACPI Error: Could not enable RealTimeClock event (20160831/evxfevnt-218)
default 16:46:07.163398-0600    com.docker.hyperkit \^[[33mWARN\^[[0m[2019-11-15T22:46:06.283329064Z] failed to load plugin io.containerd.snapshotter.v1.btrfs  \^[[33merror\^[[0m="path /var/lib/containerd/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
default 16:46:07.165905-0600    com.docker.hyperkit \^[[33mWARN\^[[0m[2019-11-15T22:46:06.285229275Z] failed to load plugin io.containerd.snapshotter.v1.aufs  \^[[33merror\^[[0m="modprobe aufs failed: "modprobe: module aufs not found in modules.dep\n": exit status 1"
default 16:46:07.171205-0600    com.docker.hyperkit \^[[33mWARN\^[[0m[2019-11-15T22:46:06.291218565Z] failed to load plugin io.containerd.snapshotter.v1.zfs  \^[[33merror\^[[0m="path /var/lib/containerd/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter"
default 16:46:07.173894-0600    com.docker.hyperkit \^[[33mWARN\^[[0m[2019-11-15T22:46:06.291372447Z] could not use snapshotter btrfs in metadata plugin  \^[[33merror\^[[0m="path /var/lib/containerd/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter"
default 16:46:07.175331-0600    com.docker.hyperkit \^[[33mWARN\^[[0m[2019-11-15T22:46:06.291471719Z] could not use snapshotter aufs in metadata plugin  \^[[33merror\^[[0m="modprobe aufs failed: "modprobe: module aufs not found in modules.dep\n": exit status 1"
default 16:46:07.176960-0600    com.docker.hyperkit \^[[33mWARN\^[[0m[2019-11-15T22:46:06.291582578Z] could not use snapshotter zfs in metadata plugin  \^[[33merror\^[[0m="path /var/lib/containerd/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter"
default 16:46:07.203958-0600    com.docker.hyperkit \^[[33mWARN\^[[0m[2019-11-15T22:46:06.324548880Z] failed to load plugin io.containerd.internal.v1.opt  \^[[33merror\^[[0m="mkdir /opt/containerd: read-only file system"
error   16:46:11.450428-0600    Docker  Cmd: unknown flag: --format
See 'docker --help'.

Usage:  docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Options:
      --config string      Location of client config files (default
                           "/Users/awadowda/.docker")
  -c, --context string     Name of the context to use to connect to the
                           daemon (overrides DOCKER_HOST env var and
                           default context set with "docker context use")
  -D, --debug              Enable debug mode
  -H, --host list          Daemon socket(s) to connect to
  -l, --log-level string   Set the logging level
                           ("debug"|"info"|"warn"|"error"|"fatal")
                           (default "info")
      --tls                Use TLS; implied by --tlsverify
      --tlscacert string   Trust certs signed only by this CA (default
                           "/Users/awadowda/.docker/ca.pem")
      --tlscert string     Path to TLS certificate file (default
                         <…>
error   16:46:11.531395-0600    Docker  Cmd: unknown flag: --format
See 'docker --help'.

Usage:  docker [OPTIONS] COMMAND

A self-sufficient runtime for containers

Options:
      --config string      Location of client config files (default
                           "/Users/awadowda/.docker")
  -c, --context string     Name of the context to use to connect to the
                           daemon (overrides DOCKER_HOST env var and
                           default context set with "docker context use")
  -D, --debug              Enable debug mode
  -H, --host list          Daemon socket(s) to connect to
  -l, --log-level string   Set the logging level
                           ("debug"|"info"|"warn"|"error"|"fatal")
                           (default "info")
      --tls                Use TLS; implied by --tlsverify
      --tlscacert string   Trust certs signed only by this CA (default
                           "/Users/awadowda/.docker/ca.pem")
      --tlscert string     Path to TLS certificate file (default
                         <…>

我还在 Github 上为 docker 打开了一个 issue,但我希望看看是否有人有过这种经历,因为 docker-compose 对我来说很重要项目。

卸载 docker-compose 并重新安装并没有解决这个问题,following this article

我是通过以下方式让它工作的:

  • 终止一个名为 policyd
  • 的进程
  • 正在卸载 docker -> brew cask uninstall docker
  • 正在重新安装 docker brew cask install docker

出于某种原因,在我这样做之后,我能够开始我的 docker-compose,我看不到任何错误。

万一有人发现这个问题,我的问题与 bash_profile 中的一些 docker 变量有关。无论出于何种原因,在我更新到 Catalina 之前它都没有表现出来。一旦我将它们注释掉,它就会立即开始工作。