Skip to content

Commit

Permalink
part 5 - dotnet
Browse files Browse the repository at this point in the history
  • Loading branch information
marcel-dempers committed Aug 4, 2019
1 parent 0e2ad9f commit ed398d3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 7 additions & 2 deletions c#/dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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
Expand Down
6 changes: 1 addition & 5 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ed398d3

Please sign in to comment.