microsoft / navcontainerhelper

Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.
MIT License
379 stars 243 forks source link

New-BCContainer gives warning of old container #1195

Closed naveksa closed 4 years ago

naveksa commented 4 years ago

Describe the issue Creating a new docker container with the new Artifact functions works fine, but we get this message:

WARNING: You are running a container which is 175 days old. Microsoft recommends that you always run the latest version of our containers.

Scripts used to create container and cause the issue New-BCContainer -accept_eula:$accept_eula -accept_outdated: $accept_out -containername $containername -artifactUrl $artifactUrl -auth Windows -alwaysPull -usessl:$false -updateHosts -assignPremiumPlan -shortcuts Desktop -imageName $navdockerimage -additionalParameters $additionalParameters -licenseFile 'C:\Naveksa\5692763_BC16_300620.flf'

Full output of scripts NavContainerHelper is version 0.7.0.23 NavContainerHelper is running as administrator Host is Microsoft Windows Server 2019 Datacenter - ltsc2019 Docker Client Version is 19.03.2 Docker Server Version is 19.03.2

Successfully built a7cce68aa648
Successfully tagged mcr.microsoft.com/businesscentral/sandbox:dk
Building image took 1984 seconds
Using image mcr.microsoft.com/businesscentral/sandbox:dk-ltsc2019
Creating Container NAVEKSA16AF
Version: 16.3.14085.14363-dk
Style: sandbox
Platform: 16.0.14073.14279
Generic Tag: 0.0.9.99
Container OS Version: 10.0.17763.973 (ltsc2019)
Host OS Version: 10.0.17763.1339 (ltsc2019)
WARNING: The container operating system matches the host operating system, but the revision is different.
If you encounter issues, you might want to specify -isolation hyperv
Using locale da-DK
Using process isolation
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file C:\Naveksa\5692763_BC16_300620.flf...
freddydk commented 4 years ago

You are using the same imageName as the Microsoft "old" images: mcr.microsoft.com/businesscentral/sandbox:dk That is wrong - if you specify an imagename together with artifacts it should be a name like: "myimage" and nothing else. This means that you are building an image called

mcr.microsoft.com/businesscentral/sandbox:dk (local image)

and then running

mcr.microsoft.com/businesscentral/sandbox:dk-ltsc2019 (microsoft image)

freddydk commented 4 years ago

I will see if I can fix containerhelper to NOT add the ltsc2019 if the image was just build.

naveksa commented 4 years ago

Great. Now we got a container created with no warnings :-)