mssql-docker icon indicating copy to clipboard operation
mssql-docker copied to clipboard

Path to sqlcmd tools are different on windows and on Mac

Open CarlSargunar opened this issue 4 months ago • 1 comments

I'm building a container running SQL 2022 : latest, and trying to execute a script using sqlcmd, but I've noticed the path of sqlcmd is different on windows vs on Arm (Apple M1)

On the windows image the path is /opt/mssql-tools/bin/sqlcmd, but on the m1 the path is /opt/mssql-tools18/bin/sqlcmd

It's the same container I'm building and running on both, my dockerfile is below. Is there any reason these paths are different on both these containers?

  FROM mcr.microsoft.com/mssql/server:2022-latest
  
  ENV ACCEPT_EULA=Y
  ENV SA_PASSWORD=xxxxxxx
  
  USER root
   
  RUN mkdir /var/opt/sqlserver
   
  RUN chown mssql /var/opt/sqlserver
   
  ENV MSSQL_BACKUP_DIR="/var/opt/mssql"
  ENV MSSQL_DATA_DIR="/var/opt/mssql/data"
  ENV MSSQL_LOG_DIR="/var/opt/mssql/log"
  
  EXPOSE 1433/tcp
  
  # Copy Setup SQL script
  COPY setup.sql /
  COPY startup.sh /
  
  ENTRYPOINT [ "/bin/bash", "startup.sh" ]
  CMD [ "/opt/mssql/bin/sqlservr" ]

CarlSargunar avatar Oct 17 '24 11:10 CarlSargunar