Skip to content

Commit 2f372e8

Browse files
authored
Update SignalR Redis tests to use internal Docker Hub mirror
Docker Hub is prone to rate limiting. To prevent this in dotnet builds we should use our internal container registry.
1 parent e7d49f5 commit 2f372e8

File tree

1 file changed

+3
-2
lines changed
  • src/SignalR/server/StackExchangeRedis/test

1 file changed

+3
-2
lines changed

src/SignalR/server/StackExchangeRedis/test/Docker.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ public class Docker
1616
{
1717
private static readonly string _exeSuffix = OperatingSystem.IsWindows() ? ".exe" : string.Empty;
1818

19-
private static readonly string _dockerContainerName = "redisTestContainer";
19+
private static readonly string _redisImageName = "dotnetdhmirror-f8bzbjakh8cga6ab.azurecr.io/library/redis:7.4";
20+
private static readonly string _dockerContainerName = "redisTestContainer74";
2021
private static readonly string _dockerMonitorContainerName = _dockerContainerName + "Monitor";
2122
private static readonly Lazy<Docker> _instance = new Lazy<Docker>(Create);
2223

@@ -112,7 +113,7 @@ void Run()
112113
// use static name 'redisTestContainer' so if the container doesn't get removed we don't keep adding more
113114
// use redis base docker image
114115
// 30 second timeout to allow redis image to be downloaded, should be a rare occurrence, only happening when a new version is released
115-
RunProcessAndThrowIfFailed(_path, $"run --rm -p 6379:6379 --name {_dockerContainerName} -d redis", "redis", logger, TimeSpan.FromMinutes(1));
116+
RunProcessAndThrowIfFailed(_path, $"run --rm -p 6379:6379 --name {_dockerContainerName} -d {_redisImageName}", "redis", logger, TimeSpan.FromMinutes(1));
116117
}
117118
}
118119

0 commit comments

Comments
 (0)