1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Laravel開発環境の起動手順【Docker / WSL】

1
Posted at

自宅PCの開発環境起動メモ。

Docker Desktop、WSL(Ubuntu)、Laravel Sail、VS Code、DBeave構成の開発環境の起動メモ

1 Docker Desktopを起動

画面左下などに「Engine running」という表示になっていることを確認。

2 Ubuntuを起動

コマンドプロンプトからUbuntを選択して起動。
または
Windowsから検索してUbuntuのを起動。
ex
user@UserPC:~$
のようになっていることを確認。

3 Laravelプロジェクトへ移動

ex
cd ~/projects/myapp
user@UserPC:~/projects/myapp$
に移動されればOK。

4 LaravelのDockerコンテナを確認

ex
./vendor/bin/sail ps
を実行。
user@UserPC:~/projects/myapp$ ./vendor/bin/sail psこんな感じ。)
STATUSがUpになっていればOK。

5 起動していなかった場合

./vendor/bin/sail up -d
を実行。
もう一度「 4 LaravelのDockerコンテナを確認」を実行。

~Point~
LaravelのDocker環境を起動
./vendor/bin/sail up -d
起動状態を確認
./vendor/bin/sail ps
LaravelのDocker環境を停止
./vendor/bin/sail down

6 ブラウザでLaravelを確認

http://localhost
へアクセス。

7 VS Codeを起動

Ubuntuで、
code .
を実行。
~/projects/myapp
がVS Codeで起動する。

8 DBeaverを確認

Windowsから検索してDBeaverを起動。

1
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?