commit
c68bbd4f83
|
@ -424,6 +424,7 @@ services:
|
||||||
build:
|
build:
|
||||||
context: ./mssql
|
context: ./mssql
|
||||||
environment:
|
environment:
|
||||||
|
- MSSQL_PID=Express
|
||||||
- MSSQL_DATABASE=${MSSQL_DATABASE}
|
- MSSQL_DATABASE=${MSSQL_DATABASE}
|
||||||
- SA_PASSWORD=${MSSQL_PASSWORD}
|
- SA_PASSWORD=${MSSQL_PASSWORD}
|
||||||
- ACCEPT_EULA=Y
|
- ACCEPT_EULA=Y
|
||||||
|
|
|
@ -294,7 +294,7 @@ PERCONA_ENTRYPOINT_INITDB=./percona/docker-entrypoint-initdb.d
|
||||||
|
|
||||||
### MSSQL #################################################
|
### MSSQL #################################################
|
||||||
|
|
||||||
MSSQL_DATABASE=homestead
|
MSSQL_DATABASE=master
|
||||||
MSSQL_PASSWORD=yourStrong(!)Password
|
MSSQL_PASSWORD=yourStrong(!)Password
|
||||||
MSSQL_PORT=1433
|
MSSQL_PORT=1433
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,6 @@
|
||||||
FROM microsoft/mssql-server-linux
|
FROM mcr.microsoft.com/mssql/server:2017-latest-ubuntu
|
||||||
|
|
||||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
|
||||||
|
|
||||||
# Create config directory
|
|
||||||
# an set it as WORKDIR
|
|
||||||
RUN mkdir -p /usr/src/app
|
|
||||||
WORKDIR /usr/src/app
|
|
||||||
|
|
||||||
# Bundle app source
|
|
||||||
COPY . /usr/src/app
|
|
||||||
|
|
||||||
RUN chmod +x /usr/src/app/create_table.sh
|
|
||||||
|
|
||||||
|
ENV MSSQL_PID=Express
|
||||||
ENV MSSQL_DATABASE=$MSSQL_DATABASE
|
ENV MSSQL_DATABASE=$MSSQL_DATABASE
|
||||||
ENV ACCEPT_EULA=Y
|
ENV ACCEPT_EULA=Y
|
||||||
ENV SA_PASSWORD=$MSSQL_PASSWORD
|
ENV SA_PASSWORD=$MSSQL_PASSWORD
|
||||||
|
@ -19,5 +8,3 @@ ENV SA_PASSWORD=$MSSQL_PASSWORD
|
||||||
VOLUME /var/opt/mssql
|
VOLUME /var/opt/mssql
|
||||||
|
|
||||||
EXPOSE 1433
|
EXPOSE 1433
|
||||||
|
|
||||||
CMD /bin/bash ./entrypoint.sh
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
#wait for the SQL Server to come up
|
|
||||||
sleep 45
|
|
||||||
|
|
||||||
#run the setup script to create the DB and the schema in the DB
|
|
||||||
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -d master -i setup.sql
|
|
|
@ -1,2 +0,0 @@
|
||||||
#start SQL Server, start the script to create the DB and import the data, start the app
|
|
||||||
/opt/mssql/bin/sqlservr & /usr/src/app/create_table.sh & tail -f /dev/null
|
|
|
@ -1,4 +0,0 @@
|
||||||
CREATE DATABASE $(MSSQL_DATABASE);
|
|
||||||
GO
|
|
||||||
USE $(MSSQL_DATABASE);
|
|
||||||
GO
|
|
Loading…
Reference in New Issue