Skip to content
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

Enable integration testing on Windows. #99

Open
coollog opened this issue Feb 14, 2018 · 7 comments
Open

Enable integration testing on Windows. #99

coollog opened this issue Feb 14, 2018 · 7 comments

Comments

@coollog
Copy link
Contributor

coollog commented Feb 14, 2018

This depends on the windows instance being able to run Docker.

@coollog
Copy link
Contributor Author

coollog commented Jul 30, 2018

Windows instance can now run Docker - this can proceed.

@coollog coollog added this to the 0.9.10 milestone Jul 30, 2018
@coollog coollog modified the milestones: v0.9.10, v0.9.11 Aug 29, 2018
@chanseokoh chanseokoh self-assigned this Sep 5, 2018
@coollog
Copy link
Contributor Author

coollog commented Sep 5, 2018

@chanseokoh feel free to take over #745 - I was trying to get it working there

@chanseokoh
Copy link
Member

Does anyone know how to restart the docker daemon on the Kokoro Windows machine? I'm trying to reload daemon.json config. I tried Net stop com.docker.service and Net start com.docker.service, and although they seem to work, I'm having trouble making it reload the config.

@briandealwis
Copy link
Member

The Docker Daemon page notes:

CONFIGURATION RELOAD BEHAVIOR

Some options can be reconfigured when the daemon is running without requiring to restart the process. We use the SIGHUP signal in Linux to reload, and a global event in Windows with the key Global\docker-daemon-config-$PID.

@chanseokoh
Copy link
Member

At first net start/stop com.docker.service seemed to work but doesn't really look like, and now I'm trying sc start/stop com.docker.service as told by the Kokoro folks. However, sc is asynchronous, so still digging into it.

@chanseokoh
Copy link
Member

chanseokoh commented Sep 6, 2018

Just an update:

I think net start/stop and sc start/stop are effectively same except that sc simply makes a request and does not block. Although sc stop does stop the Docker service and I can verify its STOPPED state, I can still do docker images or docker pull, so I think either it's not really stopping the daemon or there is another daemon running. Waiting for the Kokoro folks for an answer.

BTW, the reason I'm doing this is to enable experimental features of the Docker daemon so that I can pass the --platform linux flag.

@chanseokoh
Copy link
Member

Update:

On the Kokoro Windows machine, tasklist showed there were two processes com.docker.service and dockerd.exe running. I believe net|sc start|stop is supposed to work, but in reality, it only started/stopped com.docker.service and had no effect on dockerd.exe at all.

So I ended up doing below to turn on the experimental features of the Docker daemon:

  1. Manually kill dockerd.exe: Taskkill /IM dockerd.exe /F
  2. Update %ProgramData%\Docker\config\daemon.json to flip the value of experimental
    • Passing --experimental when starting dockerd won't work; it will complain you can't set it with both daemon.json and the flag.
    {
      "registry-mirrors":[],
      "insecure-registries":[],
      "experimental":true,
      "hosts":["tcp://0.0.0.0:2375","npipe://"]
    }
  3. Update %PATH% so that I can run dockerd.exe. (For some unknown reason on Kokoro, I can't access the binary directly.)
    set PATH=%ProgramFiles%\Docker\Docker\resources;%JAVA_HOME%\bin;%PATH%
  4. Manually start the Docker daemon: CMD /C START dockerd.

However, unfortunately, passing --platform linux to Docker did not work on Kokoro, returning the error invalid Platform OS "linux". Haven't looked into why in detail, but it appears that Linux Containers for Windows (LCOW) is not supported by the Windows OS in the Kokoro machine: docker/for-win#2241 (comment) Seems like another dead end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants