sql server - Visual Studio 2017 15.3 Dockerize Database Project -
have visual studio 2017 (15.3) solution 2 projects:
- an api written in asp.net core 2 mvc
- database project
i able "dockerize" mvc project (right click, add docker support) while trying dockerize database project keep getting error: value cannot null. parameter name: stream
. google-fu failing me; closest resource found visual studio 15.2.
how i've setup database project far
added dockerfile root:
from microsoft/mssql-server-linux:latest expose 1433 env accept_eula=y env lang en_us.utf-8 env language en_us:en env lc_all en_us.utf-8 env mssql_tcp_port=1433 # add database project output vs build process run mkdir --parents /_scripts/generated copy ./_scripts /_scripts/ copy ./_scripts/generated/*.sql /_scripts/generated/ # add shell script starts mssql server, waits 60 seconds, executes script build out db (script generated vs build process) cmd /bin/bash /_scripts/entrypoint.sh
modified docker-compose.yml file include new project
version: '3' services: webapp-api-service: image: webapp-api build: context: ./src/api dockerfile: dockerfile webapp-db-service: image: webapp-db build: context: ./src/database dockerfile: dockerfile
modified docker-composeoverride.yml file expose port dev ssms access
version: '3' services: webapp-api-service: environment: - aspnetcore_environment=development ports: - "80" webapp-db-service: ports: - "1433"
here's build output
2>c:\program files (x86)\microsoft visual studio\2017\professional\msbuild\sdks\microsoft.docker.sdk\build\microsoft.visualstudio.docker.compose.targets(279,5): error : value cannot null. 2>c:\program files (x86)\microsoft visual studio\2017\professional\msbuild\sdks\microsoft.docker.sdk\build\microsoft.visualstudio.docker.compose.targets(279,5): error : parameter name: stream 2>done building project "docker-compose.dcproj" -- failed.
thanks in advance!
i ran same issue yesterday. solved removing build portion of database service. i'll have build database project manually now.
Comments
Post a Comment