[asp.net core 2.0 and docker for linux]
I am completely new to docker and trying to figure out how to use docker in a case where i have a solution with 2 projects. All tutorials i've seen show with single project.
So, if someone could show step by step solution i would really appreciate it.
i have a solution structure like:
Solution.sln
|______WebAPIProject.csproj
|______ClassLibraryProject.csproj
In Visual studio, i've added docker support to solution and got these files:
Under WebAPIProject, it created this Docker file:
FROM microsoft/aspnetcore:2.0
ARG source
WORKDIR /app
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet", "WebAPIProject.dll"]
then, under separate docker-compose 'project' i've got:
docker-compose.ci.build.yml
version: '3'
services:
ci-build:
image: microsoft/aspnetcore-build:1.0-2.0
volumes:
- .:/src
working_dir: /src
command: /bin/bash -c "dotnet restore ./Solution.sln && dotnet publish ./Solution.sln -c Release -o ./obj/Docker/publish"
and docker.compose.yml file
version: '3'
services:
WebAPIProject:
image: WebAPIProject
build:
context: ./WebAPIProject
dockerfile: Dockerfile
I am sure its something trivial with paths but i am just pretty lost with it all so if someone could shed a bit of a light on it?