Skip to content

Windows testing #548

Closed
Closed

Description

@bsideup

We should consider different options for a Windows CI environment because ATM we only test it manually

Activity

  1. AnkBurov commented on Jan 25, 2018

    @AnkBurov
    Contributor

    Try https://www.appveyor.com/
    It's free for open-source projects and works with Maven.

  2. kiview commented on Jan 25, 2018

    @kiview
    Member

    Hey @AnkBurov, thanks for the suggestion. We've already looked into appveyor a couple of time, but currently they aren't supporting Linux Containers (LCOW). Once the provided Windows images will support LCOW and WCOW simultaneously, this might be a good solution.

  3. stale commented on Oct 28, 2018

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this.

  4. kiview commented on Nov 5, 2018

    @kiview
    Member

    We are currently working on a Windows CI environment in TeamCity.

  5. isen-ng commented on Nov 20, 2019

    @isen-ng

    AppVeyor has LCOW support now:
    https://www.appveyor.com/blog/2019/10/11/vs2019-image-with-docker-wsl-preheated/

    However, I would like to add that upon preliminary testing, the version of LCOW that AppVeyor is using seems different from the version of LCOW that docker has supported since 2016.

    The reason I say this is that, on my Windows desktop (running Linux containers), I could mount //var/run/docker.sock:/var/run/docker.sock (just like how you do it in linux), Ryuk will run, and all of my tests run.

    However, when pushed to AppVeyor (using their LCOW), they complain that //var/run/docker.sock is an invalid mount path. In the build details, you can see the docker info (using lcow) and the exact error thrown. https://ci.appveyor.com/project/isen-ng/testcontainers-dotnet/builds/28955746

    I have not had time to investigate further, but I believe this is the issue:
    https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/linux-containers

    I highly suspect that I am using LCOW with LinuxKit, while AppVeyor is using LCOW with Hyper-V (or vice-versa). And both are valid use-cases. I need find a way to detect this, and apply the correct config/mounts.

    If this hypothesis turns out to be true, this means that AppVeyor can run CI to test LCOW with Hyper-V but there are still no tests for LCOW with LinuxKit.

  6. isen-ng commented on Nov 24, 2019

    @isen-ng

    I have confirmed this behavior with further testing.

    AppVeyor's LCOW support uses the experimental feature described in https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/linux-containers

    The problem with this experimental feature is that it is incomplete, meaning there is no way to mount /var/run/docker.sock into Ryuk.

    Running a pure linux command gives the expected exception

    $ docker run --rm -v //var/run/docker.sock:/var/run/docker.sock quay.io/testcontainers/ryuk:0.2.3
    C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: invalid volume specification: '//var/run/docker.sock:/var/run/docker.sock'.
    

    Running the windows command gives another exception

    $ docker run --rm -v //./pipe/docker_engine:/var/run/docker.sock quay.io/testcontainers/ryuk:0.2.3
    C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: invalid volume specification: '//./pipe/docker_engine:/var/run/docker.sock': invalid mount config for type "npipe": Linux containers on Windows do not support named pipe mounts.
    

    This current problem is discussed in moby/moby#36574

    Essentially, the new experimental LCOW does not support docker in docker and cannot be used to run Ryuk and TestContainers in most cases.

    Now, I just need to find a CI that runs the regular LCOW on Windows.

    P.S. In any case, the experimental LCOW requires a new flag --platform which most Docker API implementations do not support yet.

  7. bsideup commented on Nov 24, 2019

    @bsideup
    MemberAuthor

    FTR we do test every master build on Windows, and some PRs when needed

  8. isen-ng commented on Nov 27, 2019

    @isen-ng

    Ohhh! you have your own Windows VM with linux containers!

  9. bsideup commented on Nov 27, 2019

    @bsideup
    MemberAuthor

    Well, it is not even a VM, but a mini Dell OptiPlex hosted at my place 😂

  10. isen-ng commented on Nov 29, 2019

    @isen-ng

    This is what I call, dedication. Up till now, I cannot find a Win10 (with GUI) ci solution for free yet.

  11. bsideup commented on Jan 31, 2020

    @bsideup
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions