mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
part 5 - dotnet
This commit is contained in:
parent
0e2ad9f05d
commit
ed398d3742
16
.vscode/launch.json
vendored
16
.vscode/launch.json
vendored
@ -4,6 +4,22 @@
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": ".NET Core Docker Attach",
|
||||
"type": "coreclr",
|
||||
"request": "attach",
|
||||
"processId": "${command:pickRemoteProcess}",
|
||||
"pipeTransport": {
|
||||
"pipeProgram": "docker",
|
||||
"pipeArgs": [ "exec", "-i", "csharp" ],
|
||||
"debuggerPath": "/root/vsdbg/vsdbg",
|
||||
"pipeCwd": "${workspaceRoot}",
|
||||
"quoteArgs": false
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/work": "${workspaceRoot}/c#/src/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Remote Docker",
|
||||
"type": "go",
|
||||
|
@ -1,4 +1,9 @@
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch as dev
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch as debug
|
||||
|
||||
#install debugger for NET Core
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y unzip
|
||||
RUN curl -sSL https://aka.ms/getvsdbgsh | /bin/sh /dev/stdin -v latest -l ~/vsdbg
|
||||
|
||||
RUN mkdir /work/
|
||||
WORKDIR /work/
|
||||
@ -10,7 +15,7 @@ COPY ./src/ /work/
|
||||
RUN mkdir /out/
|
||||
RUN dotnet publish --no-restore --output /out/ --configuration Release
|
||||
|
||||
|
||||
CMD dotnet run
|
||||
###########START NEW IMAGE###########################################
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim as prod
|
||||
|
@ -5,11 +5,7 @@ services:
|
||||
image: aimvector/csharp:1.0.0
|
||||
build:
|
||||
context: ./c#
|
||||
target: prod
|
||||
#working_dir: /work #comment out for build.target:prod
|
||||
#entrypoint: /bin/sh #comment out for build.target:prod
|
||||
#stdin_open: true #comment out for build.target:prod
|
||||
#tty: true #comment out for build.target:prod
|
||||
target: debug
|
||||
volumes:
|
||||
- ./c#/src/:/work/
|
||||
ports:
|
||||
|
Loading…
x
Reference in New Issue
Block a user