Switch branches/tags
Nothing to show
Find file Copy path
21f6447 Jan 15, 2018
1 contributor

Users who have contributed to this file

62 lines (48 sloc) 2.66 KB
# mssql-server-rhel
# Maintainers: Takayoshi Tanaka (tanaka-takayoshi on GitHub)
# GitRepo:
# Base OS layer: latest RHEL 7
### Atomic/OpenShift Labels -
LABEL name="tanaka-takayoshi/mssql-server-linux" \
vendor="tanaka_733" \
version="14.0" \
release="1" \
summary="MS SQL Server Developer Edition" \
description="MS SQL Server is ....." \
### Required labels above - recommended below
url="" \
run='docker run --name ${NAME} \
-e ACCEPT_EULA=Y -e MSSQL_SA_PASSWORD=yourStrong@Password \
-p 1433:1433 \
-d ${IMAGE}' \
io.k8s.description="MS SQL Server is ....." \
io.k8s.display-name="MS SQL Server Developer Edition"
# For environment variables list, see
# If you want to specify LCID, you may not set here. You should specify with running a docker. ``docker run -e "MSSQL_LCID=1041" <image>``
ARG SA_PASSWORD='StrongP@ssW0rd'
ARG PID=Developer
# Install latest mssql-server package
# You don't have to register subscription if you build docker image on registered RHEL machine.
# If you build on other machines, please fill in Red Hat subscription name and password and uncomment the below command.
#RUN subscription-manager register --username <your_username> --password <your_password> --auto-attach
#RUN yum install -y curl
RUN REPOLIST=rhel-7-server-rpms,packages-microsoft-com-mssql-server-2017,packages-microsoft-com-prod && \
curl -o /etc/yum.repos.d/mssql-server.repo && \
curl -o /etc/yum.repos.d/msprod.repo && \
yum install -y --disablerepo "*" --enablerepo ${REPOLIST} --setopt=tsflags=nodocs mssql-server mssql-server-agent mssql-server-fts mssql-tools unixODBC-devel && \
yum clean all && \
rm -rf /var/cache/yum
COPY uid_entrypoint /opt/mssql-tools/bin/
RUN mkdir -p /var/opt/mssql && \
chmod -R g=u /var/opt/mssql /etc/passwd
### Containers should not run as root as a good practice
USER 10001
# Default SQL Server TCP/Port
ENV PATH $PATH:/opt/mssql-tools/binTH $PATH:/opt/mssql-tools/bin
### user name recognition at runtime w/ an arbitrary uid - for OpenShift deployments
ENTRYPOINT [ "uid_entrypoint" ]
CMD /opt/mssql/bin/sqlservr