Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions linux/mssql-tools/Dockerfile.ubuntu2404
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# SQL Server Command Line Tools
FROM ubuntu:24.04

LABEL maintainer="SQL Server Engineering Team"

ENV DEBIAN_FRONTEND=noninteractive
ENV PATH="${PATH}:/opt/mssql-tools18/bin"

# Install prerequisites
RUN apt-get update && apt-get install -y \
curl \
ca-certificates \
apt-transport-https \
gnupg \
locales \
&& rm -rf /var/lib/apt/lists/*

# Add Microsoft package repository
RUN curl -fsSL https://packages.microsoft.com/keys/microsoft.asc \
| gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg

RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/ubuntu/24.04/prod noble main" \
> /etc/apt/sources.list.d/microsoft-prod.list

# Install SQL Server ODBC Driver and Tools
RUN apt-get update && ACCEPT_EULA=Y apt-get install -y \
msodbcsql18 \
mssql-tools18 \
&& rm -rf /var/lib/apt/lists/*

# Configure locale
RUN locale-gen en_US.UTF-8 \
&& update-locale LANG=en_US.UTF-8

ENV LANG=en_US.UTF-8
ENV LC_ALL=en_US.UTF-8

CMD ["/bin/bash"]