Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
344 views
in Technique[技术] by (71.8m points)

Docker connect SQL Server container non-zero code: 1

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:

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"

The errors I'm getting:

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

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) 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 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 exited with code 1


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

So...this may not be related to your particular issue. I have a feeling it won't fix it for you, because your issue sounds much lower level (as you suspect) but it's worth a shot.

I tried copy-pasting your exact docker-compose file and running it on my machine (windows desktop), I also get exited with code 1.

The only thing that seemed to fix it was using a more complex password.

I tested this multiple times in a row...I tested your password, and it failed. I tested a complex password, and it worked fine.

So I suggest using a more complex password. The password I tested with was 6Xy3LkV7!9lo2^h


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...