Skip to content

Instantly share code, notes, and snippets.

@slemeur
Created October 4, 2019 14:58
Show Gist options
  • Save slemeur/fc0d1029b2ddbeca6584be9c19a04735 to your computer and use it in GitHub Desktop.
Save slemeur/fc0d1029b2ddbeca6584be9c19a04735 to your computer and use it in GitHub Desktop.
devfile-dotnet3.yaml
metadata:
name: dotnet-web
projects:
- name: dotnet-web-simple
source:
location: 'https://github.com/che-samples/dotnet-web-simple'
type: git
branch: netcoreapp2.2
attributes:
persistVolumes: 'false'
components:
- id: redhat-developer/che-omnisharp-plugin/latest
memoryLimit: 1024Mi
type: chePlugin
alias: omnisharp
- id: redhat-developer/netcoredbg-theia-plugin/latest
memoryLimit: 512Mi
type: chePlugin
alias: netcoredbg
- mountSources: true
endpoints:
- name: 5000/tcp
port: 5000
memoryLimit: 512Mi
type: dockerimage
volumes:
- name: dotnet
containerPath: /home/user
alias: dotnet
image: 'mcr.microsoft.com/dotnet/core/sdk:3.0'
args:
- tail
- '-f'
- /dev/null
apiVersion: 1.0.0
commands:
- name: build
actions:
- workdir: '${CHE_PROJECTS_ROOT}/dotnet-web-simple'
type: exec
command: dotnet build
component: dotnet
- name: Launch .NET Web Application on Debug mode
actions:
- referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"type": "netcoredbg",
"request": "launch",
"program": "/projects/dotnet-web-simple/bin/Debug/netcoreapp3.0/web.dll",
"args": [],
"name": ".NET Core Launch (console)",
"stopAtEntry": false,
"console": "internalConsole"
}
]
}
type: vscode-launch
- name: run
actions:
- workdir: '${CHE_PROJECTS_ROOT}/dotnet-web-simple'
type: exec
command: dotnet run
component: dotnet
- name: update dependencies
actions:
- workdir: '${CHE_PROJECTS_ROOT}/dotnet-web-simple'
type: exec
command: dotnet restore
component: dotnet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment