-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix alpine socket bug #290
Changes from 2 commits
c29f06d
6d5b550
dbf7eff
f9be86e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ protected void waitUntilReady() { | |
Callable<Boolean> checkStrategy; | ||
|
||
// Special case for Docker for Mac, see #160 | ||
if (DockerClientFactory.instance().isUsing(ProxiedUnixSocketClientProviderStrategy.class)) { | ||
if (System.getProperty("os.name").toLowerCase().contains("mac")) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this might break docker-machine + Mac. IMO "and" logic is more appropriate here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think that this will break mac compatibility (the usage of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. only Docker for Mac's port checking is broken, this is why we check here. Docker Machine works fine There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, I'll change it accordingly then. |
||
List<Integer> exposedPorts = container.getExposedPorts(); | ||
|
||
Integer exposedPort = exposedPorts.stream() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,9 @@ public class ProxiedUnixSocketClientProviderStrategy extends UnixSocketClientPro | |
@Override | ||
public void test() throws InvalidConfigurationException { | ||
|
||
if (!System.getProperty("os.name").toLowerCase().contains("mac")) { | ||
throw new InvalidConfigurationException("this strategy is only applicable to OS X"); | ||
String osName = System.getProperty("os.name").toLowerCase(); | ||
if (!osName.contains("mac") && !osName.contains("linux")) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we even have to check? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could switch logic and check for Windows. |
||
throw new InvalidConfigurationException("this strategy is only applicable to OS X and Linux"); | ||
} | ||
|
||
TcpToUnixSocketProxy proxy = new TcpToUnixSocketProxy(new File(DOCKER_SOCK_PATH)); | ||
|
@@ -20,7 +21,7 @@ public void test() throws InvalidConfigurationException { | |
|
||
config = tryConfiguration("tcp://localhost:" + proxyPort); | ||
|
||
LOGGER.info("Accessing Docker for Mac unix domain socket via TCP proxy (" + DOCKER_SOCK_PATH + " via localhost:" + proxyPort + ")"); | ||
LOGGER.info("Accessing unix domain socket via TCP proxy (" + DOCKER_SOCK_PATH + " via localhost:" + proxyPort + ")"); | ||
} catch (Exception e) { | ||
|
||
proxy.stop(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
":latest" + 3rd party image. @rnorth maybe it's time to create
testcontainers
org on Docker Hub?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could remove this test as well, but I thought this might be a helpful regression test for alpine compatibility. The image itself is very simple however, so we could easily implement our own version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please could you pin to a specific tag at least for now?
I absolutely would like to set up our own images for everything - maybe a separate conversation right now though. IIRC someone is squatting on the name testcontainers (for more than a year), which sucks :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly this image does not provide any tags. If you like I can setup my own version of this image and freeze a version tag.