VS 2017 Add> Docker Support breaks build - "CleanWorkspace" task terminated unexpectedly (console application)

Firstly, I am using .NET 4.6.1. A docker with VS 2017 does not work with anything other than .NET Core?

I used the new function Add > Docker Supportin the context menu and created a bunch of files. Here is my Dockerfile (did not touch it since it was automatically created):

FROM microsoft/windowsservercore
ARG source
WORKDIR /app
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["C:\app\nameofmyapp.exe"]

When I create, I get the following error:

The CleanWorkspace task completed unexpectedly. Microsoft.DotNet.Docker.CommandLineClientException: Compose file '... \ docker-compose.yml' is invalid because: services.pas.parsemicroservice.build.context contains null, which is an invalid type, it must be a string.

Here is my docker-compose.yml file:

version: '2.1'

services:
  pas.parsemicroservice:
    image: pas.parsemicroservice
    build:
      context: 
      dockerfile: Dockerfile

. ( null, ), :

"DockerCleanServiceReferences".

.NET, ? ( n00b, .)

+4
1

. , , SLN CSPROJ . , " ".

Docker .Net Core VS 2017, 9:15 https://channel9.msdn.com/Events/Visual-Studio/Visual-Studio-2017-Launch/T111

context , Dockerfile. , docker-compose.yml.

2 : https://docs.docker.com/compose/compose-file/compose-file-v2/#context

+4

Source: https://habr.com/ru/post/1672865/


All Articles