Skip to content

Commit

Permalink
revert back to using microsoft/dotnet + add vscode launch.json
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Nov 27, 2017
1 parent 7b3e760 commit a7ffd6b
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 6 deletions.
46 changes: 46 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/Imgur/bin/Debug/netcoreapp2.0/Imgur.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Imgur",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart",
"launchBrowser": {
"enabled": true,
"args": "${auto-detect-url}",
"windows": {
"command": "cmd.exe",
"args": "/C start ${auto-detect-url}"
},
"osx": {
"command": "open"
},
"linux": {
"command": "xdg-open"
}
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
15 changes: 15 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"taskName": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/src/Imgur/Imgur.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
FROM microsoft/aspnetcore-build:2.0 AS build-env
# doesn't support microsoft/aspnetcore runtime image, fails with https://github.com/CoreCompat/CoreCompat/issues/3
FROM microsoft/dotnet:latest
COPY src /app
WORKDIR /app

RUN dotnet restore --configfile ../NuGet.Config
RUN dotnet publish -c Release -o /app/out
RUN apt-get update
RUN apt-get install fontconfig ttf-dejavu -y
RUN apt-get install -y fontconfig ttf-dejavu
ENV FONTCONFIG_PATH /etc/fonts

# Build runtime image
FROM microsoft/aspnetcore:2.0
WORKDIR /app
COPY --from=build-env /app/out .
ENV ASPNETCORE_URLS http://*:5000
WORKDIR /app/out
ENTRYPOINT ["dotnet", "Imgur.dll"]
Empty file modified scripts/build.sh
100644 → 100755
Empty file.

0 comments on commit a7ffd6b

Please sign in to comment.