-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Can not connect to SQL Server when running on Linux server or inside Docker container. Even after installing SQL drivers as directed by MS docs.
Any suggestions if this is even possible right now
Docker File:
`
FROM ubuntu:21.04
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y apt-transport-https
RUN apt-get install curl -y
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install nodejs -y
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl https://packages.microsoft.com/config/ubuntu/21.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
RUN apt-get update
RUN ACCEPT_EULA=Y apt-get install -y msodbcsql17
RUN ACCEPT_EULA=Y apt-get install -y mssql-tools
RUN echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
RUN . ~/.bashrc
RUN apt-get install unixodbc unixodbc-dev freetds-dev sqsh tdsodbc -y
WORKDIR /usr/src/app
COPY . .
RUN npm install
EXPOSE 3050
CMD [ "node", "index.js"]
`