First off I'm using .NET 4.6.1. Does Docker with VS 2017 not work with anything but .NET Core?
I used the new feature Add > Docker Support
from the context menu, and it created a bunch of files. Here's my Dockerfile (haven't touched it since it was auto-created):
FROM microsoft/windowsservercore
ARG source
WORKDIR /app
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["C:\app\nameofmyapp.exe"]
When I build, I get the following error:
The "CleanWorkspace" task failed unexpectedly. Microsoft.DotNet.Docker.CommandLineClientException: The Compose file '...\docker-compose.yml' is invalid because: services.pas.parsemicroservice.build.context contains null, which is an invalid type, it should be a string.
Here's my docker-compose.yml file:
version: '2.1'
services:
pas.parsemicroservice:
image: pas.parsemicroservice
build:
context:
dockerfile: Dockerfile
If I add a .
to context (as the error implies the null
there is the problem), I get a different error:
There is a circular dependency in the target dependency graph involving target "DockerCleanServiceReferences".
Is this all a result of using the wrong .NET framework, or are my files set up wrong? (I am a Docker n00b to be sure.)