2017年9月6日 星期三

MSSQL Server Express 2016 on Windows 10 with Docker

https://store.docker.com/editions/community/docker-ce-desktop-windows
Download Edge channel instead of stable channel
https://download.docker.com/win/edge/Docker%20for%20Windows%20Installer.exe

docker --version Docker version
docker-compose --version
docker-machine --version
docker ps
docker version
docker info

docker run hello-world
docker run -it ubuntu bash
docker pull microsoft/nanoserver
docker run -it microsoft/nanoserver cmd

docker ps -a
docker images
docker commit [CONTAINER ID] [name]
docker start [CONTAINER ID]
docker attach [CONTAINER ID]
docker rm [CONTAINER ID]
docker rmi [REPOSITORY]

Windows

docker pull microsoft/mssql-server-windows-express
docker run -d -p 1433:1433 --env sa_password=BenitoTing --isolation=hyperv microsoft/mssql-server-windows-express
docker start 791c5b93d43a
docker exec -it 791c5b93d43a sqlcmd -S. -U sa -P BenitoTing
docker inspect --format='{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' 791c5b93d43a
172.25.153.226
172.25.153.226\SQLEXPRESS
sa
BenitoTing


Linux

docker pull microsoft/mssql-server-linux
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=<YourStrong!Passw0rd>" -e "MSSQL_PID=Developer" --cap-add SYS_PTRACE -p 1434:1433 -d microsoft/mssql-server-linux
docker ps -a
70834e12fba6
docker exec -it 70834e12fba6 /opt/mssql-tools/bin/sqlcmd -S. -U sa -P "<YourStrong!Passw0rd>"
docker inspect --format='{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' 70834e12fba6
172.17.0.2
172.17.0.2\SQLEXPRESS
sa
<YourStrong!Passw0rd>

docker stop 70834e12fba6
docker commit 70834e12fba6 dockermssql
docker run -p 21433:1433 -d --name db dockermssql

沒有留言:

張貼留言

2023 Promox on Morefine N6000 16GB 512GB

2023 Promox on Morefine N6000 16GB 512GB Software Etcher 100MB (not but can be rufus-4.3.exe 1.4MB) Proxmox VE 7.4 ISO Installer (1st ISO re...