创建一个docker-compose.yml文件并定义SQL Server服务 version: '3.3' services: sqlserver: image: mcr.microsoft.com/mssql/server:2022-latest container_name: mssql-server restart: always environment: - ACCEPT_EULA=Y - SA_PASSWORD=tangdoudou.123 - MSSQL_SA_PASSWORD=tangdoudou.123 ports: - 5433...
mcr.microsoft.com/mssql/server:latest微软的仓库 查看容器状态 $ sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 2cbfe02bf409 mcr.microsoft.com/mssql/server:latest"/opt/mssql/bin/perm…"6 hours ago Up 6 hours 0.0.0.0:51433->1433/tcp mssql 修改密码 官方建议修改SA密码,...
回到SQL Server 从节点容器,并创建主从同步数据库: docker exec -it sqlserver-slave /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P P@ssw0rd02 docker exec -it sqlserver-slave /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P P@ssw0rd02' \ -Q "CREATE DATABASE mydb" \ -Q "...
1、禁用 selinux [SELINUX=disabled] 2、卸载防火墙 [yum -y remove firewalld-*] 3、docker软件安装包在 云盘\kubernetes\docker 目录下,将 docker 目录上传到跳板机 4、准备 2 台 2cpu,2G内存的云主机 跳板机yum源添加docker软件 [root@ecs-proxy ~]# cp -a docker /var/ftp/localrepo/ [root@ecs-...
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESd4a1999ef83e mcr.microsoft.com/mssql/server:2022-latest "/opt/mssql/bin/perm..." 2 minute 2.4 如果 STATUS 列显示 Up 状态,则 SQL Server 正在容器中运行,并且在侦听 PORTS 列中指定的端口。
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d4a1999ef83e mcr.microsoft.com/mssql/server:2019-latest "/opt/mssql/bin/perm..." 2 minutes ago Up 2 minutes 0.0.0.0:1433->1433/tcp, :::1433->1433/tcp sql-server2019 1.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d4a1999ef83e mcr.microsoft.com/mssql/server:2022-latest "/opt/mssql/bin/perm..." 2 minutes ago Up 2 minutes 0.0.0.0:1433->1433/tcp, :::1433->1433/tcp sql1 如果STATUS列显示Up状态,则 SQL Server 正在容器中运行,并且在侦听PORTS列中...
SQL Server 映像的必需设置。 容器配置 Requirements This image requires Docker Engine 1.8+ in any of their supported platforms. At least 2GB of RAM (3.25 GB prior to 2017-CU2). Make sure to assign enough memory to the Docker VM if you're running on Docker for Mac or Windows. Requires ...
mcr.microsoft.com/mssql/server:2019-latestSQL Server Linux 容器映像。 檢視容器清單 若要檢視 Docker 容器,請使用docker ps命令。 Bash docker ps -a 您應該會看到類似下列範例的結果: 輸出 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d4a1999ef83e mcr.microsoft.com/ms...