Skip to content

Allow non-root user to run sqlservr in a container #121

@tchughesiv

Description

@tchughesiv

I'd like to eventually support running the centos/rhel (and ubuntu for that matter) images w/ an arbitrary uid... something openshift does by default for added security.

For mssql, this would amount to allowing for non-root execution of sqlservr. Maybe logic could be added to limit non-root runtime only to containers... if, for example, msft wanted to ensure the root user was used when running outside of a container?

Today, however, it appears sqlservr may be checking for uid 0 at runtime? e.g.

# docker run -u 1000014406 -e ACCEPT_EULA=Y -e SA_PASSWORD=yourStrong@Password -p 1433:1433 -d microsoft/mssql-server-linux

$ id
uid=1000014406(root) gid=0(root) groups=0(root)

$ sqlservr 
Aborted

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions