Skip to content

Instantly share code, notes, and snippets.

@shawnweisfeld
Last active April 25, 2018 14:38

Revisions

  1. shawnweisfeld revised this gist Apr 25, 2018. 2 changed files with 1 addition and 1 deletion.
    1 change: 1 addition & 0 deletions _readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    NOTE: put both in the folder above your .csproj file
    1 change: 0 additions & 1 deletion readme.md
    Original file line number Diff line number Diff line change
    @@ -1 +0,0 @@
    NOTE: put in the folder above your .csproj file
  2. shawnweisfeld created this gist Apr 25, 2018.
    9 changes: 9 additions & 0 deletions .dockerignore
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # directories
    **/bin/
    **/obj/
    **/out/

    # files
    Dockerfile*
    **/*.trx
    **/*.md
    17 changes: 17 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    FROM microsoft/dotnet:2.0-sdk AS build
    WORKDIR /app

    # copy csproj and restore as distinct layers
    COPY MovieDB/*.csproj ./
    RUN dotnet restore

    # copy everything else and build app
    COPY MovieDB/. ./
    RUN dotnet publish -o out /p:PublishWithAspNetCoreTargetManifest="false"


    FROM microsoft/dotnet:2.0-runtime AS runtime
    ENV ASPNETCORE_URLS http://+:80
    WORKDIR /app
    COPY --from=build /app/out ./
    ENTRYPOINT ["dotnet", "MovieDB.dll"]
    1 change: 1 addition & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    NOTE: put in the folder above your .csproj file