1
如何連接到我使用docker在Linux上創建的SQL Server?使用SQL Management Studio連接到Linux上的SQL Server(docker)
這裏是我的Dockerfile:
FROM microsoft/aspnetcore:1.1.2
ARG source
WORKDIR /var/www/aspnetcoreapp
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet", "AspNetCoreWithSqlOnDocker.dll"]
和我的搬運工,撰寫:
version: '2.1'
services:
mssql:
image: "microsoft/mssql-server-linux"
environment:
SA_PASSWORD: "[email protected]"
ACCEPT_EULA: "Y"
ports:
- 1533:1533
networks:
- mynetwork
aspnetcorewithsqlondocker:
image: aspnetcorewithsqlondocker
ports:
- 5001:80
build:
context: ./AspNetCoreWithSqlOnDocker
dockerfile: Dockerfile
links:
- mssql
depends_on:
- mssql
networks:
- mynetwork
networks:
mynetwork:
driver: bridge