Skip to content

Commit

Permalink
Merge pull request #241 from walter-lopes/docker
Browse files Browse the repository at this point in the history
Criação do docker file e docker compose
  • Loading branch information
raffacabofrio authored Mar 31, 2019
2 parents 4e93a07 + 2b7da2b commit 5c1d2f8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ShareBook/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM microsoft/dotnet:2.2-sdk AS build-env
WORKDIR /app


COPY . ./
RUN dotnet publish -c Release -o out

FROM microsoft/dotnet:2.2-aspnetcore-runtime
ENV ASPNETCORE_URLS=http://+:5000
ENV ASPNETCORE_ENVIRONMENT Development
WORKDIR /app
COPY --from=build-env /app/ShareBook.Api/out/ .

ENTRYPOINT ["dotnet", "ShareBook.Api.dll"]
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: '3'

# Inicio configuracao do ASP.NET

services:
sharebook.api:
image: sharebook
ports:
- "8181:5000"
build:
context: ./ShareBook
dockerfile: Dockerfile

networks:
- sharebook
networks:
sharebook:
driver: bridge

0 comments on commit 5c1d2f8

Please sign in to comment.