-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (17 loc) · 900 Bytes
/
Dockerfile
File metadata and controls
24 lines (17 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM mcr.microsoft.com/mssql/server:2022-latest
LABEL name="Chillify Database" \
description="MSSQL Server for Chillify Application" \
version="1.0"
ENV ACCEPT_EULA=Y
ENV MSSQL_SA_PASSWORD=Admin@Pass
ENV MSSQL_PID=Developer
EXPOSE 1433
VOLUME /var/opt/mssql
COPY ./scripts/*.sql /scripts/
RUN /bin/bash -c "/opt/mssql/bin/sqlservr & /opt/mssql-tools18/bin/sqlcmd -S localhost,1433 -U sa -P Admin@Pass -C -i /scripts/tables.sql \
&& /opt/mssql-tools18/bin/sqlcmd -S localhost,1433 -U sa -P Admin@Pass -C -i /scripts/procedures.sql \
&& /opt/mssql-tools18/bin/sqlcmd -S localhost,1433 -U sa -P Admin@Pass -C -i /scripts/views.sql \
&& /opt/mssql-tools18/bin/sqlcmd -S localhost,1433 -U sa -P Admin@Pass -C -i /scripts/functions.sql \
&& /opt/mssql-tools18/bin/sqlcmd -S localhost,1433 -U sa -P Admin@Pass -C -i /scripts/data.sql \
"
CMD [ "/opt/mssql/bin/sqlservr" ]