1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Docker 環境での Jest が遅すぎる問題

Last updated at Posted at 2020-07-31

Docker の問題

タイトルには Jest がと書いたが、Jest 自体はあまり関係なく、Docker のパフォーマンスに依存する問題のように思う。

環境

Mac

$ system_profiler SPHardwareDataType
Hardware:
    Hardware Overview:
      Model Name: MacBook Pro
      Model Identifier: MacBookPro14,1
      Processor Name: Dual-Core Intel Core i7
      Processor Speed: 2.5 GHz
      Number of Processors: 1
      Total Number of Cores: 2
      L2 Cache (per Core): 256 KB
      L3 Cache: 4 MB
      Hyper-Threading Technology: Enabled
      Memory: 16 GB
      Boot ROM Version: 207.0.0.0.0
      SMC Version (system): 2.43f10

Docker

Docker Desktop for Mac

  • Version: 2.3.0.4(46911)

docker version

$ docker version
Client: Docker Engine - Community
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        48a66213fe
 Built:             Mon Jun 22 15:41:33 2020
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.12
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       48a66213fe
  Built:            Mon Jun 22 15:49:27 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

改善前

ストレスの塊。
test.png

改善後

まだ遅いが、改善前と比べれば…
delegated-test.png

やったこと

volumes に delegated のオプションを追加した

詳しくは: https://qiita.com/ysKey2/items/346c429ac8dfa0aed892

Docker を使用しない場合

なんとかここに近づけたい。
local.png

さいごに

DXを大幅に低下させるDocker for Macを捨ててMac最速のDocker環境を手に入れる
こっちも試してみたい

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?