I'm trying to run https://github.com/docker/labs/blob/master/windows/windows-containers/MultiContainerApp.md using Docker-Compose with named pipes. It's failing with an error about client API version:
PS C:\Source\Musicstore> docker-compose -f .\docker-compose.windows.yml up
ERROR: client version 1.22 is too old. Minimum supported API version is 1.25, please upgrade your client to a newer version
PS C:\Source\Musicstore> docker-compose -f .\docker-compose.windows.yml ps
ERROR: client version 1.22 is too old. Minimum supported API version is 1.25, please upgrade your client to a newer version
Here's what I have installed:
docker-compose version
docker-compose version 1.9.0-rc2, build d41f869
docker-py version: 1.10.5
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2h 3 May 2016
docker version
:
Client:
Version: 1.13.0-dev
API version: 1.25
Go version: go1.7.3
Git commit: 877c860
Built: Thu Nov 3 04:06:20 2016
OS/Arch: windows/amd64
Server:
Version: 1.13.0-dev
API version: 1.25
Go version: go1.7.3
Git commit: 877c860
Built: Thu Nov 3 04:06:20 2016
OS/Arch: windows/amd64
Experimental: false
I am seeing the same issue then running docker-compose up
on Windows Server 2016 RTM against a remote Windows Server 2016 RTM:
echo $env:DOCKER_HOST
:
tcp://10.0.0.201:2375
docker-compose version
:
docker-compose version 1.8.1, build 004ddae
docker-py version: 1.10.3
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2h 3 May 2016
docker version
:
Client:
Version: 1.12.2-cs2-ws-beta
API version: 1.25
Go version: go1.7.1
Git commit: 050b611
Built: Tue Oct 11 02:35:40 2016
OS/Arch: windows/amd64
Server:
Version: 1.13.0-dev
API version: 1.25
Go version: go1.7.3
Git commit: 81683e8
Built: Thu Nov 3 15:40:00 2016
OS/Arch: windows/amd64
The Engine shouldn't refuse older clients. This is a wontfix
as far as Compose is concerned - implications of changing the API version are too great.
Isn't the message related to docker-py 1.10.5 which implements API version 1.22? Is it possible to update docker-py independently of docker-compose on Windows? Feels like I am missing something here ;-)
Ok, I picked up builds of Docker/DockerD that have docker/docker#28072 fixed.
Based on the discussion there - I think that I should still be getting ERROR: client version 1.22 is too old. Minimum supported API version is 1.25, please upgrade your client
because the docker-compose file has version: '2'
. Instead, I get this:
PS C:\Users\Patrick\Source\Repos\MusicStore> docker-compose -f .\docker-compose.windows.yml build
db uses an image, skipping
Building web
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "compose\cli\main.py", line 65, in main
File "compose\cli\main.py", line 117, in perform_command
File "compose\cli\main.py", line 223, in build
File "compose\project.py", line 300, in build
File "compose\service.py", line 741, in build
File "site-packages\docker\api\build.py", line 105, in build
File "site-packages\docker\utils\decorators.py", line 47, in inner
File "site-packages\docker\client.py", line 135, in _post
File "site-packages\requests\sessions.py", line 522, in post
File "site-packages\requests\sessions.py", line 475, in request
File "site-packages\requests\sessions.py", line 596, in send
File "site-packages\requests\adapters.py", line 423, in send
File "site-packages\requests\packages\urllib3\connectionpool.py", line 595, in urlopen
File "site-packages\requests\packages\urllib3\connectionpool.py", line 363, in _make_request
File "httplib.py", line 1057, in request
File "httplib.py", line 1097, in _send_request
File "httplib.py", line 1053, in endheaders
File "httplib.py", line 901, in _send_output
File "httplib.py", line 870, in send
File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
File "site-packages\docker\transport\npipesocket.py", line 158, in sendall
File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
File "site-packages\docker\transport\npipesocket.py", line 153, in send
pywintypes.error: (232, 'WriteFile', 'The pipe is being closed.')
docker-compose returned -1
Why aren't I getting the right error?
If I change it to version: '2.1'
, then it works as expected.
For reference, here's the versions I'm using now:
PS C:\Users\Patrick\Source\Repos\MusicStore> docker-compose version
docker-compose version 1.9.0dev, build 9046e33
docker-py version: 1.10.6
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2h 3 May 2016
PS C:\Users\Patrick\Source\Repos\MusicStore> docker version
Client:
Version: 1.13.0-dev
API version: 1.25
Go version: go1.7.3
Git commit: c5ceb0f
Built: Sat Nov 5 03:24:43 2016
OS/Arch: windows/amd64
Server:
Version: 1.13.0-dev
API version: 1.25
Go version: go1.7.3
Git commit: c5ceb0f
Built: Sat Nov 5 03:24:43 2016
OS/Arch: windows/amd64
Experimental: false
@PatrickLang It's possible build
behaves a bit differently than other commands. Do you see the same issue with up
or ps
?
FWIW, I get the same type of error on Linux if I try to build with a version < 1.12
$ python
Python 2.7.9 (default, Apr 2 2015, 15:33:21)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import docker
>>> c = docker.Client(version='1.11')
>>> c.build('.')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/docker_py-1.10.6-py2.7.egg/docker/api/build.py", line 105, in build
timeout=timeout,
File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/docker_py-1.10.6-py2.7.egg/docker/utils/decorators.py", line 47, in inner
return f(self, *args, **kwargs)
File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/docker_py-1.10.6-py2.7.egg/docker/client.py", line 135, in _post
return self.post(url, **self._set_request_timeout(kwargs))
File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/requests/sessions.py", line 508, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/requests/sessions.py", line 465, in request
resp = self.send(prep, **send_kwargs)
File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/home/joffrey/.envs/compose/local/lib/python2.7/site-packages/requests/adapters.py", line 415, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', error(104, 'Connection reset by peer'))
I'm getting the same issue with
Client:
Version: 1.13.0-rc2
API version: 1.25
Go version: go1.7.3
Git commit: 1f9b3ef
Built: Wed Nov 23 17:40:58 2016
OS/Arch: windows/amd64
Server:
Version: 1.13.0-rc2
API version: 1.25
Minimum API version: 1.24
Go version: go1.7.3
Git commit: 1f9b3ef
Built: Wed Nov 23 17:40:58 2016
OS/Arch: windows/amd64
Experimental: false
Nevermind my comment, after setting version to 2.1 it worked. But the error message could be a bit more specific
FYI - tried 2.1 and it fixed the issue for me. Thanks :)
I still get the error trying to build a docker-compose.yml with version: "2.0"
using Docker version v1.13-rc3 too.
@PatrickLang Yes - you have to use 2.1 on Windows.
@shin- should we close this issue? I think we should still fix the error message to say "Windows requires version 2.1 or greater" instead of
PS C:\Users\Patrick\Source\Repos\MusicStore> docker-compose -f .\docker-compose.windows.yml build
db uses an image, skipping
Building web
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "compose\cli\main.py", line 65, in main
File "compose\cli\main.py", line 117, in perform_command
File "compose\cli\main.py", line 223, in build
File "compose\project.py", line 300, in build
File "compose\service.py", line 741, in build
File "site-packages\docker\api\build.py", line 105, in build
File "site-packages\docker\utils\decorators.py", line 47, in inner
File "site-packages\docker\client.py", line 135, in _post
File "site-packages\requests\sessions.py", line 522, in post
File "site-packages\requests\sessions.py", line 475, in request
File "site-packages\requests\sessions.py", line 596, in send
File "site-packages\requests\adapters.py", line 423, in send
File "site-packages\requests\packages\urllib3\connectionpool.py", line 595, in urlopen
File "site-packages\requests\packages\urllib3\connectionpool.py", line 363, in _make_request
File "httplib.py", line 1057, in request
File "httplib.py", line 1097, in _send_request
File "httplib.py", line 1053, in endheaders
File "httplib.py", line 901, in _send_output
File "httplib.py", line 870, in send
File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
File "site-packages\docker\transport\npipesocket.py", line 158, in sendall
File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
File "site-packages\docker\transport\npipesocket.py", line 153, in send
pywintypes.error: (232, 'WriteFile', 'The pipe is being closed.')
docker-compose returned -1
Should I file a separate issue for that and close this one?
pywintypes.error: (232, 'WriteFile', 'The pipe is being closed.')
That's an engine issue - the connection shouldn't be closed like this. It's a problem on Linux too as I mentioned here: https://github.com/docker/compose/issues/4106#issuecomment-258993259
We can look into adding Windows checks with a distinct error message, but we have to differentiate Windows Engine from "Docker For Windows"
Maybe related with: #268
Try to change version: "2"
to "version: "2.1"
in you docker-compose.yml
file.
@shin- I still get the error when running docker-compose on docker for windows.
version: '2.1'
PS C:\> docker-compose version
docker-compose version 1.11.1, build 7afaa436
docker-py version: 2.0.2
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.2j 26 Sep 2016
PS C:\dev\Source\DevTools\Docker> docker version
Client:
Version: 1.13.1
API version: 1.26
Go version: go1.7.5
Git commit: 092cba3
Built: Wed Feb 8 08:47:51 2017
OS/Arch: windows/amd64
Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.24)
Go version: go1.7.5
Git commit: 092cba3
Built: Wed Feb 8 08:47:51 2017
OS/Arch: windows/amd64
Experimental: true
PS C:\dev\Source\DevTools\Docker> docker-compose -f .\docker-compose.windows.yml build
consul uses an image, skipping
sql uses an image, skipping
Building audittrail
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose\cli\main.py", line 88, in main
File "compose\cli\main.py", line 140, in perform_command
File "compose\cli\main.py", line 247, in build
File "compose\project.py", line 313, in build
File "compose\service.py", line 804, in build
File "site-packages\docker\api\build.py", line 205, in build
File "site-packages\docker\utils\decorators.py", line 47, in inner
File "site-packages\docker\api\client.py", line 175, in _post
File "site-packages\requests\sessions.py", line 522, in post
File "site-packages\requests\sessions.py", line 475, in request
File "site-packages\requests\sessions.py", line 596, in send
File "site-packages\requests\adapters.py", line 423, in send
File "site-packages\requests\packages\urllib3\connectionpool.py", line 595, in urlopen
File "site-packages\requests\packages\urllib3\connectionpool.py", line 363, in _make_request
File "httplib.py", line 1042, in request
File "httplib.py", line 1082, in _send_request
File "httplib.py", line 1038, in endheaders
File "httplib.py", line 886, in _send_output
File "httplib.py", line 855, in send
File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
File "site-packages\docker\transport\npipesocket.py", line 159, in sendall
File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
File "site-packages\docker\transport\npipesocket.py", line 154, in send
pywintypes.error: (232, 'WriteFile', 'The pipe is being closed.')
Failed to execute script docker-compose
Same happen in VS2017 with docker 1.26 client version, I'll try to fix it changing .yml files version to '2.1' but still same error occurs.
1>------ Operaci贸n Compilar iniciada: proyecto: docker-compose, configuraci贸n: Debug Any CPU ------
1>docker-compose -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.yml" -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.override.yml" -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.vs.debug.yml" -p dockercompose3258359292 config
1>networks: {}
1>services:
1> webapplication1:
1> build:
1> args:
1> source: obj/Docker/empty/
1> context: c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1WebApplication1
1> dockerfile: Dockerfile
1> entrypoint: tail -f /dev/null
1> environment:
1> ASPNETCORE_ENVIRONMENT: Development
1> DOTNET_USE_POLLING_FILE_WATCHER: '1'
1> image: webapplication1:dev
1> labels:
1> com.microsoft.visualstudio.targetoperatingsystem: linux
1> ports:
1> - '80'
1> volumes:
1> - c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1WebApplication1:/app:rw
1> - C:Usersaberlinclrdbg:/clrdbg:ro
1> - C:Usersaberlin.nugetpackages:/root/.nuget/packages:ro
1>version: '2.1'
1>volumes: {}
1>docker ps --filter "status=running" --filter "name=dockercompose3258359292_webapplication1_" --format {{.ID}} -n 1
1>WebApplication1 -> c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1WebApplication1binDebugnetcoreapp1.1WebApplication1.dll
1>C:WINDOWSSystem32WindowsPowerShellv1.0powershell.exe -NonInteractive -NoProfile -WindowStyle Hidden -ExecutionPolicy RemoteSigned -File "C:UsersaberlinAppDataLocalTempGetClrDbg.ps1" -Version latest -RuntimeID debian.8-x64 -InstallPath "C:Usersaberlinclrdbg"
1>Info: Using clrdbg version '15.0.26022.0'
1>Info: Using Runtime ID 'debian.8-x64'
1>Info: Latest version of ClrDbg is present. Skipping downloads
1>docker-compose -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.yml" -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.override.yml" -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.vs.release.yml" -p dockercompose3258359292 kill
1>docker-compose -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.yml" -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.override.yml" -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.vs.release.yml" -p dockercompose3258359292 down --rmi local --remove-orphans
1>Removing network dockercompose3258359292_default
1>Network dockercompose3258359292_default not found.
1>docker-compose -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.yml" -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.override.yml" -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.vs.debug.yml" -p dockercompose3258359292 kill
1>docker-compose -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.yml" -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.override.yml" -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.vs.debug.yml" -p dockercompose3258359292 down --rmi local --remove-orphans
1>Removing network dockercompose3258359292_default
1>Network dockercompose3258359292_default not found.
1>docker-compose -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.yml" -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.override.yml" -f "c:usersaberlindocumentsvisual studio 2017ProjectsWebApplication1docker-compose.vs.debug.yml" -p dockercompose3258359292 up -d --build
1>Creating network "dockercompose3258359292_default" with the default driver
1>HNS failed with error : Unspecified error
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: Error inesperado en la tarea "PrepareForLaunch".
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose3258359292_default" with the default driver
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: HNS failed with error : Unspecified error.
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018:
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: Para m谩s informaci贸n de soluci贸n de problemas, vaya a http://aka.ms/DockerToolsTroubleshooting ---> Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose3258359292_default" with the default driver
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: HNS failed with error : Unspecified error
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: --- Fin del seguimiento de la pila de la excepci贸n interna ---
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: --- Fin del seguimiento de la pila de la ubicaci贸n anterior donde se produjo la excepci贸n ---
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.DotNet.Docker.DockerWorkspace.d__14.MoveNext()
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: --- Fin del seguimiento de la pila de la ubicaci贸n anterior donde se produjo la excepci贸n ---
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.DotNet.Docker.BuildTasks.DockerBaseTask.Execute()
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityMSBuildMicrosoftVisualStudiov15.0DockerMicrosoft.VisualStudio.Docker.Compose.targets(192,5): error MSB4018: en Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
1>Compilaci贸n del proyecto "docker-compose.dcproj" terminada -- ERROR.
========== Compilar: 0 correctos o actualizados, 1 incorrectos, 0 omitidos ==========
@aberlin75 That error seems unrelated. Looks like a network issue similar to #4482
Hi guys, after changing docker-compose.yml version from '2' to '2.1' I get following error: Creating network "laradock_default" with the default driver
ERROR: HNS failed with error : wrong parameter.
docker version
Client:
Version: 17.03.1-ce
API version: 1.27
Go version: go1.7.5
Git commit: c6d412e
Built: Tue Mar 28 00:40:02 2017
OS/Arch: windows/amd64
Server:
Version: 17.03.1-ce
API version: 1.27 (minimum version 1.24)
Go version: go1.7.5
Git commit: c6d412e
Built: Tue Mar 28 00:40:02 2017
OS/Arch: windows/amd64
Experimental: true
any ideas? :)
I am getting same error when I change the version in compose file to 2.1 I am getting this error: Creating network with default driver HNS failed with error: The parameter is incorrect. I am using vs2017, Windows container, Windows 10.
I am also getting this error when I change to 2.1 (Windows 10 + VS 2017 Latest Docker + Windows Container)
Severity Code Description Project File Line Suppression State
Error MSB4018 The "PrepareForLaunch" task failed unexpectedly.
Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose2647930274_default" with the default driver
HNS failed with error : The parameter is incorrect. .
For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting ---> Microsoft.DotNet.Docker.CommandLineClientException: Creating network "dockercompose2647930274_default" with the default driver
HNS failed with error : The parameter is incorrect.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerComposeClient.
--- End of inner exception stack trace ---
at Microsoft.DotNet.Docker.DockerComposeClient.
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerWorkspace.
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.BuildTasks.DockerBaseTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.
@David-Paterson @hugo1337 - This is a networking issue on Docker Windows, not a Compose issue. See #4482 and https://github.com/moby/moby/issues/30280
I'll close this issue as the original problem has been fixed and it is generating a lot of noise.
I'll create a separate issue to address https://github.com/docker/compose/issues/4106#issuecomment-266105765
I'm not having success with setting version: '2.1' on my docker-compose.yml
It still claims my version is 1.21 with a minimum version of 1.24
$ docker version
Client:
Version: 17.06.1-ce
API version: 1.30
Go version: go1.8.3
Git commit: 874a737
Built: Thu Aug 17 22:48:20 2017
OS/Arch: windows/amd64
Server:
Version: 17.06.1-ce
API version: 1.30 (minimum version 1.24)
Go version: go1.8.3
Git commit: 874a737
Built: Thu Aug 17 23:03:03 2017
OS/Arch: windows/amd64
Experimental: true
$ docker-compose version
docker-compose version 1.14.0, build c7bdf9e3
docker-py version: 2.3.0
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.2j 26 Sep 2016
md5-4894d8d92af9313ee53a1d41dfa6981f
$ docker-compose up
client version 1.21 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version
md5-fafaa0c305d4355b2beecaa6189c5611
version: '2.1'
volumes:
database_data:
driver: local
services:
nginx:
image: nginx:latest
ports:
- 8080:80
volumes:
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
volumes_from:
- php
php:
build: ./docker/php/
expose:
- 9000
volumes:
- .:/var/www/html
mysql:
image: mysql:latest
expose:
- 3306
volumes:
- database_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: project
MYSQL_USER: project
MYSQL_PASSWORD: project
^^^ This is a fresh new install, and my first docker experience.
How is this easier again?
Hi Guys,
I am getting this error
Error MSB4018 The "PrepareForLaunch" task failed unexpectedly.
Microsoft.DotNet.Docker.CommandLineClientException: client version 1.22 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version
My Environment
docker version
Client:
Version: 17.09.0-ce
API version: 1.32
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:40:09 2017
OS/Arch: windows/amd64
Server:
Version: 17.09.0-ce
API version: 1.32 (minimum version 1.24)
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:50:27 2017
OS/Arch: windows/amd64
Experimental: true
docker-compose version
docker-compose version 1.16.1, build 6d1ac219
docker-py version: 2.5.1
CPython version: 2.7.13
OpenSSL version: OpenSSL 1.0.2j 26 Sep 2016
How do I change the version to 2.x? Any other fix?
Thanks.
Got it resolved by changing the version to 2.1 everywhere, in all the docker-compose files.
Now I am getting this error when I am trying to run docker for windows on windows host
Error: image operating system linux cannot be used
Any suggestions?
Thanks
Its kinda relevant and might help some people so I'm gonna post this here:
After recent "Docker for Windows" update or fresh install people get switched to Windows containers
mode. If you are in this mode and try to run/build linux containers you'll probably get errors like:
client version 1.22 is too old. Minimum supported API version is 1.24, please up grade your client to a newer version
or
image operating system linux cannot be used
Make sure you switch to Linux containers
mode if you want to use linux containers.
smacks forehead
WHAT?!
Really?!
I mean, I haven't installed this again anyway since HyperV prevents me from creating other VMs on the machine. So... that's pretty garbage.
My Environment
Windows 10
docker version
Client:
Version: 18.05.0-ce
API version: 1.37
Go version: go1.9.5
Git commit: f150324
Built: Wed May 9 22:12:05 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.05.0-ce
API version: 1.37 (minimum version 1.24)
Go version: go1.10.1
Git commit: f150324
Built: Wed May 9 22:29:00 2018
OS/Arch: windows/amd64
Experimental: true
client version 1.22 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version
ERROR !!!! Unable to start network
Please let me know the error resolve details.
Clique com o bot茫o direito do mouse no icone do docker e escolha a op莽茫o "switch to linux containers" como mencionado mais acima dos coment谩rios
an advantage in use Windows containers is: low memory used ... when we use linux containers ... the hyper-v starts an virtual machine with 2gb memory. Why docker-compose does not work with windows containers ?
This is the error for me...
Hi @felipemarques.
Have you enabled "Experimental Features" in the Daemon section in the Docker for Windows settings? By doing this I was able to pull and run images based on linux with Windows Containers enabled.
Windows 10 Pro 1809
Docker version 18.09.2, build 6247962
docker-compose version 1.23.2, build 1110ad01
(Windows Containers enabled)
Switch to Linux Container is help me to resolve the issue
Most helpful comment
Its kinda relevant and might help some people so I'm gonna post this here:
After recent "Docker for Windows" update or fresh install people get switched to
Windows containers
mode. If you are in this mode and try to run/build linux containers you'll probably get errors like:client version 1.22 is too old. Minimum supported API version is 1.24, please up grade your client to a newer version
or
image operating system linux cannot be used
Make sure you switch to
Linux containers
mode if you want to use linux containers.