I'm having an issue with manually building and running a windows server core container with a legacy asp.net web application. From Visual Studio I can run the container with the auto-generated dockerfile/yml file.
I want to do a docker build and docker run powershell command using the dockerfile instead of with Visual Studio.
This is current yml file:
version: '3'
services:
fulldotnetwebapplication:
image: fulldotnetwebapplication
build:
context: .\FullDotNetWebApplication
dockerfile: Dockerfile
This is the current dockerfile:
FROM microsoft/aspnet:4.7.1-windowsservercore-ltsc2016
ARG source
WORKDIR /inetpub/wwwroot
COPY ${source:-obj/Docker/publish} .
Let's say my ASP project is FullDotNetWebApplicationand it contains App_Data, Content, Controllers, etc folders plus Master/ASPX pages along with web/packages/config.
I tried this for my Dockerfile:
FROM microsoft/aspnet:4.7.1-windowsservercore-ltsc2016
WORKDIR /inetpub/wwwroot
COPY . .
COPY ./bin ./bin
and am getting this error:
docker : COPY failed: GetFileAttributesEx \\?\C:\Windows\TEMP\docker-builder977521850\bin: The system cannot find the file specified.
At line:1 char:1
+ docker build -t fulldotnetwebapplication .
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (COPY failed: Ge...file specified.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
What should my docker file look like to deploy this application to IIS from Powershell? I'm not understanding what magic VS is doing to make this work? Is it building the application or some sort of deployment file being generated? Any examples I could be pointed to or sample Dockerfile's would be great.