Merge pull request #2422 from rmeira/master

Update MSSQL image
This commit is contained in:
Shao Yu-Lung (Allen) 2019-12-21 18:52:41 +08:00 committed by GitHub
commit c68bbd4f83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 4 additions and 27 deletions

View File

@ -424,6 +424,7 @@ services:
build:
context: ./mssql
environment:
- MSSQL_PID=Express
- MSSQL_DATABASE=${MSSQL_DATABASE}
- SA_PASSWORD=${MSSQL_PASSWORD}
- ACCEPT_EULA=Y

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,4 +0,0 @@
CREATE DATABASE $(MSSQL_DATABASE);
GO
USE $(MSSQL_DATABASE);
GO