github-actionstestcontainerswindows-container

How to run a container on GitHub actions Windows agent?


It is known that "testcontainers" doesn't work on Windows 2019 (issue).

java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration
    at org.testcontainers.dockerclient.DockerClientProviderStrategy.lambda$getFirstValidStrategy$7(DockerClientProviderStrategy.java:256)
    at java.base/java.util.Optional.orElseThrow(Optional.java:403)
    at org.testcontainers.dockerclient.DockerClientProviderStrategy.getFirstValidStrategy(DockerClientProviderStrategy.java:247)

What is possible alternatives or workarounds for that, e.g. starting a custom service from an image on GitHub actions "windows-2019" agents?

For clarity, let's take a JMS broker (image "symptoma/activemq:5.16.2") and try to start it so it is available in OS on port 12345: (tcp://localhost:12345)

How to start ActiveMQ on GitHub actions Windows agent (runs-on: windows-2019)?


Solution

  • As per GitHub info on their issues, Windows agents are not supported. I'd incentivize you to pile on the request there so they revert the decision and bring support for Windows.