[asp.net core 2.0 and docker for Linux]
I am completely new to docker and trying to figure out how to use docker when I have a solution with two projects. All the tutorials I've seen show one project.
So, if someone can show a 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 added docker support for the solution and got these files:
In WebAPIProject, he 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 in a separate project file "docker-compose" I have:
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 file docker.compose.yml
version: '3'
services:
WebAPIProject:
image: WebAPIProject
build:
context: ./WebAPIProject
dockerfile: Dockerfile
I'm sure this is something trivial with paths, but I just lost it all, so if someone can shed light on it?