Skip to content

Commit

Permalink
Use mssql/server:2022-latest for MsSql container (#3082)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeauchesne authored Sep 20, 2024
1 parent 3983d6c commit 2f631c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions utils/_context/_scenarios/endtoend.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
CassandraContainer,
RabbitMqContainer,
MySqlContainer,
SqlServerContainer,
MsSqlServerContainer,
create_network,
BuddyContainer,
TestedContainer,
Expand Down Expand Up @@ -85,7 +85,7 @@ def __init__(
self._supporting_containers.append(MySqlContainer(host_log_folder=self.host_log_folder))

if include_sqlserver:
self._supporting_containers.append(SqlServerContainer(host_log_folder=self.host_log_folder))
self._supporting_containers.append(MsSqlServerContainer(host_log_folder=self.host_log_folder))

self._required_containers.extend(self._supporting_containers)

Expand Down
7 changes: 4 additions & 3 deletions utils/_context/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -918,21 +918,22 @@ def __init__(self, host_log_folder) -> None:
)


class SqlServerContainer(SqlDbTestedContainer):
class MsSqlServerContainer(SqlDbTestedContainer):
def __init__(self, host_log_folder) -> None:
self.data_mssql = f"./{host_log_folder}/data-mssql"
healthcheck = {}
if not platform.processor().startswith("arm"):
# [!NOTE] sqlcmd tool is not available inside the ARM64 version of SQL Edge containers.
# see https://hub.docker.com/_/microsoft-azure-sql-edge
# XXX: Using 127.0.0.1 here instead of localhost to avoid using IPv6 in some systems.
# -C : trust self signed certificates
healthcheck = {
"test": '/opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U sa -P "yourStrong(!)Password" -Q "SELECT 1" -b -o /dev/null',
"test": '/opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U sa -P "yourStrong(!)Password" -Q "SELECT 1" -b -C',
"retries": 20,
}

super().__init__(
image_name="mcr.microsoft.com/azure-sql-edge:latest",
image_name="mcr.microsoft.com/mssql/server:2022-latest",
name="mssql",
cap_add=["SYS_PTRACE"],
user="root",
Expand Down

0 comments on commit 2f631c8

Please sign in to comment.