问题
The command I used was: ibmcloud target --cf
The error I receive is given below:
-----> Finalizing Dotnet Core ERROR Unable to install dotnet-runtime: could not find a version o f dotnet-runtime to install Failed to compile droplet: Failed to run finalize script: exit status 12 Exit status 223 Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 stopping instance e5256fa6-702e-41f 2-8c49-039400712a85 Cell 0f7012eb-9e32-4fdf-ba92-85aee4639139 destroying container for instance e 5256fa6-702e-41f2-8c49-039400712a85 Error staging application: App staging failed in the buildpack compile phase FAILED
回答1:
This is what I tried and worked for me
- Installed IBM Cloud CLI
- Followed the instructions in the documentation here to clone a getting started dotnet application
- Cloned the sample app and
cd
into the folder - Run
ibmcloud cf push
You should see a random URL generated with the todo app
Use a Cloud Foundry CLI that's managed by IBM to work with Cloud Foundry resources through the IBM Cloud CLI. If you have a separate Cloud Foundry CLI (cf) installation, don't use both ibmcloud cf commands and cf commands in the same context. Instead, use only ibmcloud cf [command] to manage resources in the IBM Cloud CLI context. More info here
回答2:
after a lot of work and help from people I found out that I was using the wrong buildpack. If your application is built in ASP.Net framework 4.5 or newer then you need to use the hwc pack. Also, your manifest.yml will need changes. This is my manifest.yml.
applications:
- name: random-route: true memory: 128M buildpack: https://github.com/cloudfoundry/hwc-buildpack.git env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
This works. Create a toolchain build and deploy.
来源:https://stackoverflow.com/questions/62621799/my-app-deployment-to-cloud-foundry-fails-on