BurntSushi / erd

Translates a plain text description of a relational database schema to a graphical entity-relationship diagram.
The Unlicense
1.79k stars 154 forks source link

docs: info for osx docker oom #86

Closed andres-lowrie closed 3 years ago

andres-lowrie commented 3 years ago

By default Docker for OSX only gives docker 2 Gb of memory. This may be an issue when building the executable via docker seeing as the aeson library requires a hefty amount of memory, eg: https://github.com/haskell/aeson/issues/738

So this adds some info to the docs to help guide users on how to give docker more memory on osx

andres-lowrie commented 3 years ago

I ran into this issue when building via docker on my mac, had to up the memory to get it to build. Thought this would be useful for other mac users wanting to use the docker image.

Here's my system info for prosperity sake

System

❯ uname -rsv
Darwin 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64
  System Version:   macOS 10.15.7 (19H2)

Docker Info

❯ docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.4.2-docker)
  scan: Docker Scan (Docker Inc., v0.5.0)

Server:
...
 Server Version: 20.10.0
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 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: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc version: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.19.121-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 6
 Total Memory: 5.809GiB
 Name: docker-desktop
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 41
  Goroutines: 47
  System Time: 2021-01-02T04:22:29.042540811Z
  EventsListeners: 4
 HTTP Proxy: gateway.docker.internal:3128
 HTTPS Proxy: gateway.docker.internal:3129
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: true
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine
mmzx commented 3 years ago

This is a nice finding, indeed ghc compilation tends to be memory heavy. I myself lack the docker experience on mac, so I am unable to conclude whether it is a general thing or a specific one. Would that be possible to have this behavior recorded in the Dockerfile itself, pehaps?

andres-lowrie commented 3 years ago

for sure, let me move these comments to the Dockefile really quick see what it looks like

andres-lowrie commented 3 years ago

What do you think?... It does help keep the readme from getting too crowded

mmzx commented 3 years ago

@andres-lowrie Thank you for your contribution!