forked from shanegenschaw/mssql-server-linux
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
22 lines (15 loc) · 864 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM mcr.microsoft.com/mssql/server
LABEL description="Extension of the mcr.microsoft.com/mssql/server docker image to support initdb scripts"
LABEL maintainer="Sysdyne Technologies"
USER root
# Install SqlPackage - https://docs.microsoft.com/en-us/sql/tools/sqlpackage
RUN apt-get update && apt-get install unzip
RUN wget -q --show-progress -O sqlpackage.zip https://go.microsoft.com/fwlink/?linkid=2261577
RUN unzip -qo sqlpackage.zip -d /opt/sqlpackage && chmod +x /opt/sqlpackage/sqlpackage
ENV PATH $PATH:/opt/mssql-tools/bin:/opt/sqlpackage
VOLUME /docker-entrypoint-initdb.d
EXPOSE 1433
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD "sqlcmd -U sa -P ${SA_PASSWORD} -Q 'SELECT 1;' &> /dev/null"
COPY docker-entrypoint.sh /usr/local/bin/
COPY docker-entrypoint-initdb.sh /usr/local/bin/
ENTRYPOINT ["docker-entrypoint.sh"]