Closed SillyCode closed 1 year ago
Hello @SillyCode, we will take a look
Hello @SillyCode, we wasn`t able to reproduce this error using docker-compose file with version 3.9. For testing we used more simplified docker compose configuration with windows/nanoserver image (unfortunately I did not find information about image my-mssql-image:latest that you use in your example), and build was successful. I suggest the problem can be with specified container image that you use. If problem still exist, please provide more detailed repro steps (for example minimum repo with ready pipeline and docker-compose file).
docker-compose.yml
version: "3.9"
services:
sql-server-db:
container_name: my-mssql
image: mcr.microsoft.com/windows/nanoserver:1809-KB5022840-amd64
ports:
- "1433:1433"
environment:
SA_PASSWORD: "***************"
ACCEPT_EULA: "Y"
Starting: Initialize job logs
Starting: Initialize job
Agent name: 'Hosted Agent'
Agent machine name: 'WIN-D0QP9LQROBF'
Current agent version: '2.217.2'
Operating System
Microsoft Windows Server 2019
10.0.17763
Datacenter
Runner Image
Image: windows-2019
Version: 20230214.1
Included Software: https://github.com/actions/runner-images/blob/win19/20230214.1/images/win/Windows2019-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/win19%2F20230214.1
Spin up container job log
Creating network "azuritetest_default" with the default driver
Pulling sql-server-db (mcr.microsoft.com/windows/nanoserver:1809-KB5022840-amd64)...
1809-KB5022840-amd64: Pulling from windows/nanoserver
Digest: sha256:4fa54f9de5b106a5695b3227a1cceb2a35fee92b0e922b4010691a67d600cbd2
Status: Downloaded newer image for mcr.microsoft.com/windows/nanoserver:1809-KB5022840-amd64
Creating my-mssql ...
Creating my-mssql ... done
Finishing: Spin up container
Hi sergei-pyshnoi, Thank you for having some time for this.
I use a private private registry image that is based on mssql 2019. It was working fine until the Docker upgrade. Have to mention that no changes to pipeline were made since.
Can you tell which service runs the Docker-compose in the log?
In my case it is located in Chocolatey\bin
##[debug]which 'docker-compose'
##[debug]found: 'C:\ProgramData\Chocolatey\bin\docker-compose.exe'
@SillyCode
C:\ProgramData\Chocolatey\bin\docker-compose.exe -f D:\a\1\s\docker-compose.yaml -f C:\agents\2.217.2\.docker-compose.1676992147189.yml -p AzuriteTest up -d
Creating network "azuritetest_default" with the default driver
Pulling sql-server-db (mcr.microsoft.com/windows/nanoserver:1809-KB5022840-amd64)...
1809-KB5022840-amd64: Pulling from windows/nanoserver
Digest: sha256:4fa54f9de5b106a5695b3227a1cceb2a35fee92b0e922b4010691a67d600cbd2
Status: Downloaded newer image for mcr.microsoft.com/windows/nanoserver:1809-KB5022840-amd64
Creating my-mssql ...
Creating my-mssql ... done
##[debug]Exit code 0 received from tool 'C:\ProgramData\Chocolatey\bin\docker-compose.exe'
I am at lost to why does it work. You can also see mathias-kogler reply
And I can confirm that his workaround works.
I believe there is something wrong with the DockerCompose@0
task. It should take the latest Docker-Compose utility instead of the old one from Choco, that is incompatible
Hello @SillyCode . You are right, the DockerCompose@0
use version from C:\ProgramData\Chocolatey\bin\
. You can create issue in tasks repo about this, because its out of scope of runner-images repo.
Thank you @sergei-pyshnoi . I will.
Description
Following the upgrade to the Docker and Docker Compose and issue #7080.
Currently the latest windows-2019 release is 20230214.1.
Which contains the following Docker related versions: Docker 23.0.1 and Docker Compose V2 2.16.0
Ref: https://github.com/actions/runner-images/releases/tag/win19%2F20230214.1
Using this Windows-2019 image. We face the issue below:
The current Compose file version is not compatible with your engine version. Please upgrade your Compose file to a more recent version, or set a COMPOSE_API_VERSION in your environment.
My docker-compose file
Looking at the build log. We can see that the issue is reported actually by Choco Docker Compose.
Specifically the line
##[error]The process 'C:\ProgramData\Chocolatey\bin\docker-compose.exe' failed with exit code 1
Printing the environment variables:
As can be seen from the environment variable output. There is no mentioning of the Docker path.
Going ahead to get the version of the Choco Docker Compose via:
Outputted the following:
docker-compose version 1.29.2, build 5becea4c
Choco Docker Compose for reference: https://community.chocolatey.org/packages/docker-compose
To summarize. It seems that the Docker Compose is installed via Choco package. And it is currently supports old version. Hence it seems to me, why we have incompatibility issue. In spite of having latest Docker Compose version listed on the image.
Platforms affected
Runner images affected
Image version and build link
Operating System Microsoft Windows Server 2019 10.0.17763 Runner Image Image: windows-2019 Version: 20230214.1
Image release: https://github.com/actions/runner-images/releases/tag/win19%2F20230214.1
Is it regression?
yes. Version 20230129.2
Expected behavior
The Docker container with Docker Compose should run without having incompatibility issue between the Docker compose and Docker engine
Actual behavior
Currently, we have the following error generated when trying to run Docker compose
Repro steps
Below are the steps that reproduce the issue:
My docker-compose file