Skip to content

Can't run "./run api" on Apple M1 chip #368

Closed

Description

I am unable to run the ./run api command on my MacBook Air with the new M1 chip (ARM architecture).

Error log:

=> [alvtime_db 3/4] COPY ./ /scripts/                                                                             0.0s
 => ERROR [alvtime_db 4/4] RUN (/opt/mssql/bin/sqlservr --accept-eula & ) | grep -q "Service Broker manager has s  0.3s
------
 > [alvtime_db 4/4] RUN (/opt/mssql/bin/sqlservr --accept-eula & ) | grep -q "Service Broker manager has started" && sleep 5s && (for foo in /scripts/*.sql;do /opt/mssql-tools/bin/sqlcmd -S127.0.0.1 -Usa -PAlvTimeTestErMoro32  -i$foo;done):
#12 0.288 /opt/mssql/bin/sqlservr: Invalid mapping of address 0x4008948000 in reserved address space below 0x400000000000. Possible causes:
#12 0.288 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);
#12 0.288 2) the process (itself, or via a wrapper) adjusts its own execution domain and flag the system its legacy personality via syscall personality(2);
#12 0.288 3) sysadmin deliberately sets the system to run on legacy VA layout mode by adjusting a sysctl knob vm.legacy_va_layout.
#12 0.288 
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c (/opt/mssql/bin/sqlservr --accept-eula & ) | grep -q "Service Broker manager has started" && sleep 5s && (for foo in /scripts/*.sql;do /opt/mssql-tools/bin/sqlcmd -S127.0.0.1 -Usa -P${SA_PASSWORD}  -i$foo;done)]: exit code: 1

The issue appears to be related to microsoft/mssql-docker#668, which states that the mssql-docker image is not supported on the new M1 Macs.


Would it be possible to use another SQL DB, such as Postgres? Or perhaps use a remote DB on e.g. Azure instead as a workaround?


See this comment for solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions