Docker Compose v2 vs v1 and XMCloud introduction github repo

Introduction

RecentlyXMCloud introduction github repo was made compatible with Docker compose V2. So, this blog article touches both of those.

First of all, a few important points regarding difference between Docker compose V2 and V1. There seems to be architectural difference in the way V2 is built compared to V1:

Release in the above table denotes ongoing release as of this blog article. Although v2 has been in development for long, it gains prominence now since v1 is going out of support in June 2023.

 XMCloud introduction github  on Windows 11

Today, installed XMCloud introduction github repo on a brand new Windows 11 Pro machine:



XMCloud introduction github repo on my machine runs on latest Docker Desktop version 4.20.0. The latest changes in the repo include compatibility with Docker version V2. 

Here are some important points to note regarding Docker compose v2 vs v1. From a developer point of view, docker-compose gets separated or, in other words, you can type docker in cli and you can receive help. If you want to utilize v2, all that you have to do is install the latest Docker Desktop for windows.


CLI Changes

Docker CLI Commands V2 vs V1:

Other command types in Docker V2:


New Global Options in V2:



Note that --debug and --log-level are interesting new additions.

init.ps1 PowerShell Script change

The XMCloud introduction github repo readme page is fairly self-explanatory about how to setup the environment locally. Since I started with a brand new machine, one of the things I found is, the installation fails in the fag-end if there is no .net SDK in the machine. 


Although the .NET SDK is specified as a pre-requisite in the readme page, I added the following block on top of init.ps1 so that the developer doesn't have to execute the complete up.ps1 to find sync has failed due to lack of dotnet sdk:

###############
# Dotnet Exists
###############
Write-Host "Checking Dotnet SDK installation." -ForegroundColor Green
$DotNetExists=Test-Path($Env:Programfiles + "\dotnet\sdk")

if (-not ($DotNetExists))
{
Write-Error "DotNet SDK not present. Install from https://aka.ms/dotnet-download" 
}


End-result

Once sdk is installed, authentication followed by serialization is successful and the latest SUGCON sites are accessible:

Comments