<tfoot id='t6ttc'></tfoot>

        <i id='t6ttc'><tr id='t6ttc'><dt id='t6ttc'><q id='t6ttc'><span id='t6ttc'><b id='t6ttc'><form id='t6ttc'><ins id='t6ttc'></ins><ul id='t6ttc'></ul><sub id='t6ttc'></sub></form><legend id='t6ttc'></legend><bdo id='t6ttc'><pre id='t6ttc'><center id='t6ttc'></center></pre></bdo></b><th id='t6ttc'></th></span></q></dt></tr></i><div id='t6ttc'><tfoot id='t6ttc'></tfoot><dl id='t6ttc'><fieldset id='t6ttc'></fieldset></dl></div>
        <legend id='t6ttc'><style id='t6ttc'><dir id='t6ttc'><q id='t6ttc'></q></dir></style></legend>
          <bdo id='t6ttc'></bdo><ul id='t6ttc'></ul>

        <small id='t6ttc'></small><noframes id='t6ttc'>

        Docker 连接 SQL Server 容器非零代码:1

        时间:2023-08-20

          <legend id='VbxY2'><style id='VbxY2'><dir id='VbxY2'><q id='VbxY2'></q></dir></style></legend>
          <i id='VbxY2'><tr id='VbxY2'><dt id='VbxY2'><q id='VbxY2'><span id='VbxY2'><b id='VbxY2'><form id='VbxY2'><ins id='VbxY2'></ins><ul id='VbxY2'></ul><sub id='VbxY2'></sub></form><legend id='VbxY2'></legend><bdo id='VbxY2'><pre id='VbxY2'><center id='VbxY2'></center></pre></bdo></b><th id='VbxY2'></th></span></q></dt></tr></i><div id='VbxY2'><tfoot id='VbxY2'></tfoot><dl id='VbxY2'><fieldset id='VbxY2'></fieldset></dl></div>

              <tfoot id='VbxY2'></tfoot>
                  <bdo id='VbxY2'></bdo><ul id='VbxY2'></ul>

                  <small id='VbxY2'></small><noframes id='VbxY2'>

                    <tbody id='VbxY2'></tbody>
                  本文介绍了Docker 连接 SQL Server 容器非零代码:1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试从 docker-compose.yml 创建一个 SQL Server 容器,但是当我运行它时,它直接停止并出现一些错误.注意:它在带有 docker Preview 的 Apple M1 芯片上运行

                  I'm trying to create a SQL Server container from a docker-compose.yml but when I run it, it directly stops with some errors. Note: it's running on an Apple M1 chip with docker Preview

                  docker-compose.yml:

                  docker-compose.yml:

                  version: "3.7"
                  services:
                    sql-server-db:
                      container_name: sql-server-db
                      image: mcr.microsoft.com/mssql/server:2019-latest
                      ports: 
                        - "1433:1433"
                      environment: 
                        SA_PASSWORD: "ApplePassDockerConnect"
                        ACCEPT_EULA: "Y"
                  

                  我遇到的错误:

                  sql-server-db |/opt/mssql/bin/sqlservr:0x4000000000000 以下保留地址空间中地址 0x40092b8000 的无效映射.可能的原因:

                  sql-server-db | /opt/mssql/bin/sqlservr: Invalid mapping of address 0x40092b8000 in reserved address space below 0x400000000000. Possible causes:

                  sql-server-db |1) 进程(本身,或通过包装器)启动自己的运行环境,通过 syscall setrlimit(2) 将堆栈大小限制设置为无限制;

                  sql-server-db | 1) the process (itself, or via a wrapper) starts-up its own running environment sets the stack size limit to unlimited via syscall setrlimit(2);

                  sql-server-db |2) 进程(本身,或通过包装器)调整自己的执行域,并通过系统调用个性(2)标记系统其遗留个性;

                  sql-server-db | 2) the process (itself, or via a wrapper) adjusts its own execution domain and flag the system its legacy personality via syscall personality(2);

                  sql-server-db |3) sysadmin 通过调整 sysctl 旋钮 vm.legacy_va_layout 故意将系统设置为在旧版 VA 布局模式下运行.

                  sql-server-db | 3) sysadmin deliberately sets the system to run on legacy VA layout mode by adjusting a sysctl knob vm.legacy_va_layout.

                  sql-server-db |

                  sql-server-db |

                  sql-server-db 退出,代码为 1

                  sql-server-db exited with code 1

                  推荐答案

                  你不能真正在 M1 上使用 mcr.microsoft.com/mssql/server:2019-latest 容器,因为 MSSQL DB 不支持ARM架构.我发现的唯一方法是使用支持 ARM 并且可以在 M1 上运行的 Azure SQL 容器.

                  You cant really use mcr.microsoft.com/mssql/server:2019-latest containers on M1 because MSSQL DB does not support ARM architecture. The only way I found - is to use Azure SQL container that supports ARM and can be run on M1.

                  这里是我的 docker-compose.yml 配置示例:

                  Here my docker-compose.yml config example:

                  version: "3.9"
                  
                  services:
                      # Database instance
                      mssql:
                        image: mcr.microsoft.com/azure-sql-edge:latest
                        volumes:
                          - events_mssql:/var/opt/mssql
                        ports:
                          - 1433:1433
                        environment:
                          - ACCEPT_EULA=1
                          - MSSQL_SA_PASSWORD=Passw@rd
                  
                  volumes:
                      events_mssql:
                  

                  您将能够使用用户名:sa、密码:Passw@rd 和数据库:master 连接到此数据库.如果您想要其他数据库名称 - 您可以创建一个新的 使用 SQL:CREATE DATABASE TestDB

                  You will be able to connect to this DB using username: sa, password: Passw@rd and database: master. If you want other db name - you can create a new one using SQL: CREATE DATABASE TestDB

                  该数据库具有与 MSSQL DB 相同的 API,因此它适用于 pyodbc(M1 不支持)和 pymssql 库.

                  This database has the same API as MSSQL DB, so it works with pyodbc (not supported on M1) and pymssql libraries.

                  如果您在 M1 机器上本地使用它 - 考虑使用 pymssql 库连接到 Azure SQL DB.这是我对 pyodbc 问题的回答 https://stackoverflow.com/a/66919686/11515610

                  If you are using it locally on your M1 machine - consider using pymssql library for connection to Azure SQL DB. Here my answer on issue with pyodbc https://stackoverflow.com/a/66919686/11515610

                  这篇关于Docker 连接 SQL Server 容器非零代码:1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:在 m1 处理器中运行的 Docker 镜像 下一篇:M1 Mac 上的 Pyodbc

                  相关文章

                  最新文章

                  • <bdo id='N5rXJ'></bdo><ul id='N5rXJ'></ul>
                  <i id='N5rXJ'><tr id='N5rXJ'><dt id='N5rXJ'><q id='N5rXJ'><span id='N5rXJ'><b id='N5rXJ'><form id='N5rXJ'><ins id='N5rXJ'></ins><ul id='N5rXJ'></ul><sub id='N5rXJ'></sub></form><legend id='N5rXJ'></legend><bdo id='N5rXJ'><pre id='N5rXJ'><center id='N5rXJ'></center></pre></bdo></b><th id='N5rXJ'></th></span></q></dt></tr></i><div id='N5rXJ'><tfoot id='N5rXJ'></tfoot><dl id='N5rXJ'><fieldset id='N5rXJ'></fieldset></dl></div>

                    <tfoot id='N5rXJ'></tfoot><legend id='N5rXJ'><style id='N5rXJ'><dir id='N5rXJ'><q id='N5rXJ'></q></dir></style></legend>

                      <small id='N5rXJ'></small><noframes id='N5rXJ'>