Open sonnguyent2 opened 9 months ago
Hi @sonnguyent2, I've switched to compose, do you mind give it a try at https://github.com/MihaMarkic/Cake.Docker/tree/feature/compose2 or I could create a prerelease package for you.
Hi @MihaMarkic thanks for your response, I have tried to build the code but get this error:
src\Cake.Docker.Tests\Compose\Ps\DockerComposePsTest.cs(13,58): error CS0117: 'DockerComposePsSettings' does not contain a definition for 'Filters'
. In the DockerComposePsSettings
, there is an Filter
property but not Filters
, could you please double check ?
@sonnguyent2 I see, fixed. It should compile now.
@MihaMarkic yes, its compiled but still got error. Root cause come from the order of command arguments.
This command built by ProcessArgumentBuilder: docker compose build --file docker-compose.yml
will not work because --file
is not argument of build
command, instead it is compose
's argument
https://docs.docker.com/engine/reference/commandline/compose/
This command will work: docker compose --file docker-compose.yml build
I managed to make it work by update GenericDockerRunner but it's just a temp solution. For the permanent solution, looking forward to hearing from you.
@sonnguyent2 Hm, good catch, I guess. I have to verify, but I suppose you are correct. Also I wouldn't expect that orders of arguments matter.
@sonnguyent2 Can you try with latest sources? Commit: 0bcf83c
Note: I've separated the two settings into DockerComposeSettings and command specific one.
Hi,
Any news on this ?
According to this issue it seems the standalone docker-compose (aka v1) is being retired from ubuntu runners starting this month and we are already seeing runners without it.
I'd be happy to help.
Best Regards,
@silex-victor I created a commit and asked you to give it a try - see a my answer above...
(Just for the record i was not the original other of this issue)
I'm unable to make it work with the sources from the branch you mentionned and be able to reference the sources / nupkg from our build.cake file, is there documentation somwhere on how to achieve this ?
If it's easy on your side, could you publish a prerelease build from your branch (as mentionned in this comment so I could test it on my side and come back to you ?
Best Regards,
Ok so it seems I was able to make it work referencing the dll itself by using #reference "Dlls/Cake.Docker.dll"
(built from the branch feature/compose2
) and it seems to be working fine, but I'm unsure of my process.
@silex-victor Will publish a prerelease, sorry for the delay
@silex-victor @sonnguyent2 Released in 1.4.0-beta.1, can you give it a try?
Currently DockerComposeBuild still use Compose V1 instead of V2. It requires to install docker-compose package. Do you have any plan to migrate to Compose V2?