title: Docker connect SQL Server container non-zero code: 1
body: <p>I'm trying to create a SQL Server container from a <code>docker-compose.yml</code> but when I run it, it directly stops with some errors. Note: it's running on an Apple M1 chip with docker Preview</p>
  <p>docker-compose.yml:</p>
  <pre><code>version: &quot;3.7&quot;
  services:
    sql-server-db:
      container_name: sql-server-db
      image: mcr.microsoft.com/mssql/server:2019-latest
      ports: 
        - &quot;1433:1433&quot;
      environment: 
        SA_PASSWORD: &quot;ApplePassDockerConnect&quot;
        ACCEPT_EULA: &quot;Y&quot;
  </code></pre>
  <p>The errors I'm getting:</p>
  <blockquote>
  <p>sql-server-db | /opt/mssql/bin/sqlservr: Invalid mapping of address 0x40092b8000 in reserved address space below 0x400000000000. Possible causes:</p>
  <p>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);</p>
  <p>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);</p>
  <p>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.</p>
  <p>sql-server-db |</p>
  <p>sql-server-db exited with code 1</p>
  </blockquote>