I am using Visual studio 2017 IDE for windows dockerizing purpose of a Mvc app(DotNet 4.5) which depends on sql server .For that i am using Windows server 2016 datacenter, version 10.0.14393 build 14393 with docker(64 bit) ,it gave info as ran "docker version" at PS
PS C:\Users\tutul2018> docker version
Client:
Version: 18.03.1-ee-3
API version: 1.37
Go version: go1.10.2
Git commit: b9a5c95
Built: Thu Aug 30 18:42:35 201
OS/Arch: windows/amd64
Experimental: false
Server:
Engine:
Version: 18.03.1-ee-3
API version: 1.37 (minimum version 1
Go version: go1.10.2
Git commit: b9a5c95
Built: Thu Aug 30 18:56:49 201
OS/Arch: windows/amd64
Experimental: false
Below is docker file :-
FROM microsoft/aspnet:4.7.2-windowsservercore-ltsc2016
ARG source
WORKDIR /inetpub/wwwroot
COPY ${source:-obj/Docker/publish} .
Below is 'docker-compose.yml' file, here i am preparing instructions for Mvc App image and sql server image :-
version: '3.4'
services:
webapplicationdockerapp-db:
image: microsoft/mssql-server-windows-express
container_name: webapplicationdockerapp-db
environment:
sa_password: "Test@12"
ACCEPT_EULA: Y
ports:
- "1433:1433"
webapplicationdockerapp:
image: ${DOCKER_REGISTRY-}webapplicationdockerapp
build:
context: .\WebApplicationDockerApp
dockerfile: Dockerfile
environment:
TestDB: "Server=webapplicationdockerapp-db;Database=TestDB;User Id=sa;Password=Test@12;"
depends_on:
- "webapplicationdockerapp-db"
ports:
- "80:80"
Below is 'docker-compose.overrides.yml' file , here i am describing the network of default as 'nat':-
version: '3.4'
networks:
default:
external:
name: nat
When i tried to run the Mvc app using container at windows server 2016 by visual studio 2017 IDE, it gave an error as "HNS failed with error : Unspecified error” .Below as
Recreating dockercompose10638987249071720390_webapplicationdockerapp_1 ... Recreating dockercompose10638987249071720390_webapplicationdockerapp_1 ... error ERROR: for dockercompose10638987249071720390_webapplicationdockerapp_1 Cannot start service webapplicationdockerapp: failed to create endpoint dockercompose10638987249071720390_webapplicationdockerapp_1 on network nat: HNS failed with error : Unspecified error ERROR: for webapplicationdockerapp Cannot start service webapplicationdockerapp: failed to create endpoint dockercompose10638987249071720390_webapplicationdockerapp_1 on network nat: HNS failed with error : Unspecified error Encountered errors while bringing up the project..
Pls guide or help.
Thanks,