@@ -424,6 +424,7 @@ services:
 | 
			
		||||
      build:
 | 
			
		||||
        context: ./mssql
 | 
			
		||||
      environment:
 | 
			
		||||
        - MSSQL_PID=Express
 | 
			
		||||
        - MSSQL_DATABASE=${MSSQL_DATABASE}
 | 
			
		||||
        - SA_PASSWORD=${MSSQL_PASSWORD}
 | 
			
		||||
        - ACCEPT_EULA=Y
 | 
			
		||||
 
 | 
			
		||||
@@ -294,7 +294,7 @@ PERCONA_ENTRYPOINT_INITDB=./percona/docker-entrypoint-initdb.d
 | 
			
		||||
 | 
			
		||||
### MSSQL #################################################
 | 
			
		||||
 | 
			
		||||
MSSQL_DATABASE=homestead
 | 
			
		||||
MSSQL_DATABASE=master
 | 
			
		||||
MSSQL_PASSWORD=yourStrong(!)Password
 | 
			
		||||
MSSQL_PORT=1433
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,17 +1,6 @@
 | 
			
		||||
FROM microsoft/mssql-server-linux
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
FROM mcr.microsoft.com/mssql/server:2017-latest-ubuntu
 | 
			
		||||
 | 
			
		||||
ENV MSSQL_PID=Express
 | 
			
		||||
ENV MSSQL_DATABASE=$MSSQL_DATABASE
 | 
			
		||||
ENV ACCEPT_EULA=Y
 | 
			
		||||
ENV SA_PASSWORD=$MSSQL_PASSWORD
 | 
			
		||||
@@ -19,5 +8,3 @@ ENV SA_PASSWORD=$MSSQL_PASSWORD
 | 
			
		||||
VOLUME /var/opt/mssql
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
		Reference in New Issue
	
	Block a user