Skip to content

Commit eaab43c

Browse files
committed
improve example "ms sql server linux docker image"
1 parent 5adefc1 commit eaab43c

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

Examples/SqlServerDockerImage/create-database.dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ RUN dotnet tool install --global SqlDatabase.GlobalTool
2121
# 2. create database
2222
# 3. shatdown mssql server
2323
RUN /opt/mssql/bin/sqlservr & \
24-
sleep 20 && \
2524
export PATH="$PATH:/root/.dotnet/tools" && \
2625
SqlDatabase create \
27-
"-database=Data Source=.;Initial Catalog=SqlDatabaseDemo;User Id=sa;Password=P@ssw0rd;" \
26+
"-database=Data Source=.;Initial Catalog=SqlDatabaseDemo;User Id=sa;Password=P@ssw0rd;ConnectRetryCount=20;ConnectRetryInterval=1" \
2827
-from=/sql-scripts && \
2928
pkill sqlservr
3029

Examples/SqlServerDockerImage/upgrade-database-scripts.dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ RUN dotnet tool install --global SqlDatabase.GlobalTool
1818
# 2. upgrade database
1919
# 3. shatdown mssql server
2020
RUN /opt/mssql/bin/sqlservr & \
21-
sleep 20 && \
2221
export PATH="$PATH:/root/.dotnet/tools" && \
2322
SqlDatabase upgrade \
24-
"-database=Data Source=.;Initial Catalog=SqlDatabaseDemo;User Id=sa;Password=P@ssw0rd;" \
23+
"-database=Data Source=.;Initial Catalog=SqlDatabaseDemo;User Id=sa;Password=P@ssw0rd;ConnectRetryCount=20;ConnectRetryInterval=1" \
2524
-from=/sql-scripts && \
2625
pkill sqlservr
2726

0 commit comments

Comments
 (0)