0
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?

ReactをDocker desktop for windowsで動かすと遅くない?

Posted at

Reactで開発しているときに,
・buildのnpmインストールの時間かかりすぎ
・ホットリロード(ファイル編集後の反映)が全然ホットじゃない,むしろ冷めてるやん
みたいな経験のある方に向けた記事になります.

これはReactに限らずNext.js環境で開発を進めようとしていると出会う障壁みたいです.
どうやらwindowsとLinuxのOS間でのファイルの読み書きが死ぬほど遅いらしい.

WSL2でdockerを動かしていても,windows配下のファイルをlinux配下にマウントして読み取りに行くだけで遅い.
じゃあそもそもdocker自体をfor windowsで動かしているとさらに...ってなっているみたいです.
(解釈が間違っているとあれなのでソースは貼っておきます)

改善策としては
ubuntu上にdocker engineを入れて動かす.
ファイルを
\wsl.localhost\Ubuntu\mntではなく
\wsl.localhost\Ubuntu\homeに置く
だそうです.

以下の記事を参考にしてみてください.

0
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
0
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?