Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to latest mssql/server image #65

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions Examples/SqlServerDockerImage/create-database.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM microsoft/mssql-server-linux:latest AS build
FROM mcr.microsoft.com/mssql/server:latest AS build

ENV ACCEPT_EULA=Y \
SA_PASSWORD=P@ssw0rd \
Expand All @@ -7,11 +7,14 @@ ENV ACCEPT_EULA=Y \
# copy scripts
COPY create-database-scripts/ /sql-scripts/

# install .net 6.0 sdk
# switch to root
USER root

# install .net 8.0 sdk
RUN apt-get update && \
apt-get install -y apt-transport-https && \
apt-get update && \
apt-get install -y dotnet-sdk-6.0
apt-get install -y dotnet-sdk-8.0

# install SqlDatabase.GlobalTool
RUN dotnet tool install --global SqlDatabase.GlobalTool
Expand All @@ -27,7 +30,10 @@ RUN /opt/mssql/bin/sqlservr & \
-from=/sql-scripts && \
pkill sqlservr

FROM microsoft/mssql-server-linux:latest AS runtime
# set mssql user as SqlServer files owner
RUN chown -R mssql /var/opt/mssql/data

FROM mcr.microsoft.com/mssql/server:latest AS runtime

ENV ACCEPT_EULA=Y \
SA_PASSWORD=P@ssw0rd \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ FROM sqldatabase/mssql-server-linux-demo:create AS build
# copy scripts
COPY upgrade-database-scripts/ /sql-scripts/

# install .net 6.0 sdk
# switch to root
USER root

# install .net 8.0 sdk
RUN apt-get update && \
apt-get install -y apt-transport-https && \
apt-get update && \
apt-get install -y dotnet-sdk-6.0
apt-get install -y dotnet-sdk-8.0

# install SqlDatabase.GlobalTool
RUN dotnet tool install --global SqlDatabase.GlobalTool
Expand All @@ -24,7 +27,10 @@ RUN /opt/mssql/bin/sqlservr & \
-from=/sql-scripts && \
pkill sqlservr

FROM microsoft/mssql-server-linux:latest AS runtime
# set mssql user as SqlServer files owner
RUN chown -R mssql /var/opt/mssql/data

FROM mcr.microsoft.com/mssql/server:latest AS runtime

ENV ACCEPT_EULA=Y \
SA_PASSWORD=P@ssw0rd \
Expand Down