skip to Main Content

Installed docker in Centos 7.

  1. docker setup for SQL server based on this url Microsoft docker link

  2. Docker is converted to Non-root user

Still Error is shown for permissions as below

SQL Server 2019 will run as non-root by default.
This container is running as user mssql.
/opt/mssql/bin/permissions_check.sh: line 59: exec: -v: invalid option
exec: usage: exec [-cl] [-a name] [command [arguments …]] [redirection …]

Any guidance would be appreciated

2

Answers


  1. Chosen as BEST ANSWER

    Thanks for all the helps provided. It was due to the permissions issue to the mounted folder from non-root user.

    Alternative approach is taken instead of /var/opt path, went on with approach of SQLvolume. So permissions/non-root user permissions issues


  2. Thank you for all your suggestions.

    I get error

        /opt/mssql/bin/permissions_check.sh: line 59: exec: --: invalid option
    

    But, in my case, I found answer in docker forums.

    And, my full command for start docker is:

        sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=******" 
        -v /Data/mssql:/var/opt/mssql/data 
        -p 1433:1433 
        --name sql1 
        -h sql1 
        -d mcr.microsoft.com/mssql/server:2019-latest 
        --restart=always
    

    And short answer looks as "the parameter –restart=always can’t be the end of the sentence"

    In common words, error "invalid option" means a general error in the docker command and may not be a container-specific error.

    In my case, other arguments order help me:

        sudo docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=******" -v /Data/mssql:/var/opt/mssql/data -p 1433:1433 --restart=always --name sql1 -h sql1 -d mcr.microsoft.com/mssql/server:2019-latest
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search