3.6. .NET Core 2.1 のサンプルアプリケーションの作成
3 つのサンプルアプリケーションが利用できます。
- dotnet-example: これは、デフォルトの model-view-controller(MVC)アプリケーションです。
-
dotnet-runtime-example: これは、チェーンビルドを使用して MVC アプリケーションをビルドする方法を示しています。アプリケーションは
dotnet/dotnet-21-rhel7でビルドされます。結果はubi8/dotnet-21-runtime-rhel7にデプロイされます。チェーンされたビルドは OpenShift Online ではサポートされません。 - dotnet-pgsql-persistent: これは、PostgreSQL バックエンドを使用した Microsoft ASP.NET Core MusicStore サンプルアプリケーションです。
OpenShift Web コンソールを使用してサンプルを追加するには、プロジェクトを参照し、Add to project をクリックします。dotnet のフィルターを設定できます。サンプルが表示されない場合は、以下のコマンドを実行してインストールに追加できます。
$ oc create -f https://raw.githubusercontent.com/redhat-developer/s2i-dotnetcore/master/templates/dotnet-example.json $ oc create -f https://raw.githubusercontent.com/redhat-developer/s2i-dotnetcore/master/templates/dotnet-runtime-example.json $ oc create -f https://raw.githubusercontent.com/redhat-developer/s2i-dotnetcore/master/templates/dotnet-pgsql-persistent.json