DEV Community

Seijiro Ozawa
Seijiro Ozawa

Posted on

2

ローカル開発環境にVirtualBoxを使用する

経緯

DockerDesktop(Windows)、WSLとの戦いに敗れた.
プロジェクト単位での仮想環境というより適当に使えるローカル開発環境が欲しかった。

やったこと

  1. VirtualBoxのインストール
  2. Debian10(Buster)のイメージのDL
  3. HostOnlyNetworkの設定

1の手順

https://www.virtualbox.org/wiki/Downloads

2の手順

https://www.debian.org/distrib/

3の手順

ホストOS側でホストオンリーネットワークを設定.

ゲストOSで下記の設定を追加

"/etc/systemd/network/enp0s8.network" というファイルを作り,次のように記入する.
[Match]
enp0s8

[Network]
Address=192.168.151.100
DNS=192.168.151.1

sudo service networkservice restart

以上.

以下の記事を参考にしました。
https://qiita.com/Yoshiki-Takahashi/items/7274dff15dbafee5b118

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay