File tree Expand file tree Collapse file tree
linux/9.3.x/sitecore-sxa-ps-sql Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55
66## July 2020
77
8+ - [ Added] Sitecore 9.3.0 XP/SXA/PS SQL linux images.
89- [ Fixed] Sitecore 9.3.0 XP/SXA Solr linux images.
910
1011## May 2020
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 22
33[ // ] : # " start: stats "
44
5- [ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-green.svg?style=flat-square )] ( https://opensource.org/licenses/MIT ) ![ Repositories] ( https://img.shields.io/badge/Repositories-104 -blue.svg?style=flat-square ) ![ Tags] ( https://img.shields.io/badge/Tags-783 -blue.svg?style=flat-square ) ![ Deprecated] ( https://img.shields.io/badge/Deprecated-0-lightgrey.svg?style=flat-square ) ![ Dockerfiles] ( https://img.shields.io/badge/Dockerfiles-98 -blue.svg?style=flat-square ) ![ Default version] ( https://img.shields.io/badge/Default%20version-9.3.0%20on%20ltsc2019/1809-blue?style=flat-square )
5+ [ ![ License: MIT] ( https://img.shields.io/badge/License-MIT-green.svg?style=flat-square )] ( https://opensource.org/licenses/MIT ) ![ Repositories] ( https://img.shields.io/badge/Repositories-105 -blue.svg?style=flat-square ) ![ Tags] ( https://img.shields.io/badge/Tags-784 -blue.svg?style=flat-square ) ![ Deprecated] ( https://img.shields.io/badge/Deprecated-0-lightgrey.svg?style=flat-square ) ![ Dockerfiles] ( https://img.shields.io/badge/Dockerfiles-99 -blue.svg?style=flat-square ) ![ Default version] ( https://img.shields.io/badge/Default%20version-9.3.0%20on%20ltsc2019/1809-blue?style=flat-square )
66
77[ // ] : # " end: stats "
88
Original file line number Diff line number Diff line change 1+ ARG BASE_IMAGE
2+
3+ FROM $BASE_IMAGE as builder
4+
5+ USER root
6+
7+ RUN apt-get -y update \
8+ && apt-get -y --allow-unauthenticated install unzip \
9+ && wget -progress=bar:force -q -O sqlpackage.zip https://go.microsoft.com/fwlink/?linkid=2113331 \
10+ && unzip -qq sqlpackage.zip -d /opt/sqlpackage \
11+ && chmod +x /opt/sqlpackage/sqlpackage
12+
13+ COPY *.zip /opt/wdp/
14+
15+ RUN unzip -qq /opt/wdp/Sitecore*scwdp.zip -d /opt/wdp/
16+
17+ COPY attach-databases.sh /opt/
18+ COPY install-databases.sh /opt/
19+
20+ ENV DB_PREFIX='sc'
21+
22+ RUN mkdir -p /install \
23+ && chmod -R 700 /install \
24+ && chmod +x /opt/*.sh \
25+ && cp /clean/* /install/ \
26+ && ( /opt/mssql/bin/sqlservr & ) | grep -q "Service Broker manager has started" \
27+ && ./opt/attach-databases.sh /install \
28+ && ./opt/install-databases.sh /opt/wdp
29+
30+ FROM $BASE_IMAGE
31+
32+ COPY --from=builder ["/install/*" , "/clean/" ]
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ dataDir=$1
4+
5+ for attempt in {1..10}
6+ do
7+ echo " ### Connection attempt $attempt ..."
8+
9+ /opt/mssql-tools/bin/sqlcmd -S . -U sa -P $SA_PASSWORD -t 120 -l 120 -Q " SELECT Name from sys.Databases" > /dev/null 2>&1
10+
11+ if [[ $? == 0 ]]; then
12+ echo " ### Connected."
13+
14+ break
15+ else
16+ echo " ### Retrying..."
17+
18+ sleep 1
19+ fi
20+ done
21+
22+ echo " ### Attaching databases in '$dataDir ':"
23+
24+ set -e
25+
26+ echo " ### Attaching databases now '$dataDir ':"
27+
28+ for filename in $dataDir /Sitecore.* .mdf; do
29+ [ -e " $filename " ] || continue
30+
31+ fileBaseName=$( basename $filename .mdf)
32+ databaseName=" ${fileBaseName/ _Primary/ } "
33+ ldfPath=" $dataDir /$fileBaseName .ldf"
34+ mdfPath=$filename
35+
36+ echo " ### Attaching '$databaseName ' from '$mdfPath ' and '$ldfPath '..."
37+
38+ /opt/mssql-tools/bin/sqlcmd -S . -U sa -P $SA_PASSWORD -t 60 -l 300 -Q " CREATE DATABASE [$databaseName ] ON (FILENAME = '$mdfPath '),(FILENAME = '$ldfPath ') FOR ATTACH"
39+ done
40+
41+ echo " ### Databases ready."
Original file line number Diff line number Diff line change 1+ {
2+ "tags" : [
3+ {
4+ "tag" : " sitecore-xp-sxa-ps-sql:9.3.0-linux" ,
5+ "build-options" : [
6+ " --build-arg BASE_IMAGE=sitecore-xp-sxa-sql:9.3.0-linux"
7+ ]
8+ }
9+ ],
10+ "sources" : [
11+ " Sitecore Publishing Module 9.3.0.0.scwdp.zip"
12+ ]
13+ }
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ source=$1
3+
4+ for attempt in {1..10}
5+ do
6+ echo " ### Connection attempt $attempt ..."
7+
8+ /opt/mssql-tools/bin/sqlcmd -S . -U sa -P $SA_PASSWORD -t 120 -l 120 -Q " SELECT Name from sys.Databases" > /dev/null 2>&1
9+
10+ if [[ $? == 0 ]]; then
11+ echo " ### Connected."
12+
13+ break
14+ else
15+ echo " ### Retrying..."
16+
17+ sleep 1
18+ fi
19+ done
20+
21+ echo " ### Installing databases..."
22+
23+ set -e
24+
25+ for filename in $source /* .dacpac; do
26+ [ -e " $filename " ] || continue
27+
28+ fileBaseName=$( basename $filename .dacpac)
29+ databaseName=" Sitecore.${fileBaseName} "
30+
31+
32+ echo " ### Installing '$databaseName ' from '$filename '..."
33+
34+ /opt/sqlpackage/sqlpackage /a:Publish /tsn:. /tdn:$databaseName /tu:sa /tp:$SA_PASSWORD /sf:$filename /tt:120 /q
35+ done
You can’t perform that action at this time.
0 commit comments