File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
linux/preview/examples/mssql-rhel7-sql2019 Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ # SQL Server 2019 on RHEL 7 sample script
2+ # This is a sample script shared to help create the SQL Server 2019 containers images based on RHEL 7
3+ # This script can be modified to add other SQL Server components like polybase, Full text search, and others.
4+ # Base OS layer: latest RHEL 7 latest image
5+ FROM registry.access.redhat.com/rhel7:latest
6+
7+ # # Adding the required repos for installing SQL Server, tools, and other dependent packages.
8+ RUN REPOLIST=rhel-7-server-rpms,packages-microsoft-com-mssql-server-2019,packages-microsoft-com-prod && \
9+ curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2019.repo && \
10+ curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/7/prod.repo && \
11+ ACCEPT_EULA=Y yum -y install --disablerepo "*" --enablerepo ${REPOLIST} --setopt=tsflags=nodocs \
12+ mssql-server mssql-tools unixODBC-devel && \
13+ yum clean all
14+
15+ # # Providing the required access to the mssql server folders
16+ RUN mkdir -p -m 770 /var/opt/mssql && chown -R mssql. /var/opt/mssql
17+
18+ # # Default SQL Server port
19+ EXPOSE 1433
20+
21+ # # Running SQL containers as non-root
22+ USER mssql
23+
24+ # # Start SQL server
25+ CMD /opt/mssql/bin/sqlservr
You can’t perform that action at this time.
0 commit comments