pullしてdevcontainerで起動すれば実行できます。
対象 | バージョン |
---|---|
JDKバージョン | 21 |
Spring Bootバージョン | 3.2.4 |
ビルドツール | Maven |
プロジェクトタイプ | Java |
- 拡張機能
- Spring Web:Web開発
- Spring Boot Dev Tools:ホットリロード
発表資料:assets/PS Live デブコン祭り-Spring boot.pdf
- 環境作成:Spring Bootの環境をダウンロード
- Spring Initializerからプロジェクトを作成してダウンロードする
- 改善
- 改善1:Volume Trickを使用してビルドファイルをコンテナ内に収める
- 改善2:非rootユーザーで実行する
- 改善3:レイヤーキャッシュを活用して効率化する
- 起動確認
- 環境作成:devcontainerで立ち上げる
.
├── .devcontainer
│ ├── Dockerfile
│ └── devcontainer.json // devcontainer設定ファイル
├── app // Spring Bootプロジェクト
├── docker-compose.yml
└── README.md