Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BCArtifact.cache on file share #2800

Closed
tscottjendev opened this issue Nov 24, 2022 · 1 comment
Closed

BCArtifact.cache on file share #2800

tscottjendev opened this issue Nov 24, 2022 · 1 comment
Assignees
Labels

Comments

@tscottjendev
Copy link

PLEASE DO NOT INCLUDE ANY PASSWORDS OR TOKENS IN YOUR ISSUE!!!

Describe the issue
We will have several servers acting as Docker hosts and was hoping we could "share" artifacts between the servers. So, I changed the default path for artifacts and getting this error

DockerDo : docker: Error response from daemon: invalid volume specification: '\vR2-Jendev-FS\Docker_File_Share\bcartifacts.cache:c:\dl'.

Scripts used to create container and cause the issue

$containerName = 'bcsqlremote'
$credential = Get-Credential -Message 'Using Windows authentication. Please enter your Windows credentials for the host computer.'
$auth = 'Windows'
$artifactUrl = Get-BcArtifactUrl -type 'OnPrem' -country 'gb' -select 'Latest'
$databaseServer = 'vr2-jendevsql'
$databaseInstance = ''
$databaseName = 'Demo Database BC (21-0)'
$databaseUsername = <dbUser>
$databasePassword = <dbPassword>
$databaseSecurePassword = ConvertTo-SecureString -String $databasePassword -AsPlainText -Force
$databaseCredential = New-Object pscredential $databaseUsername, $databaseSecurePassword
New-BcContainer `
    -accept_eula `
    -containerName $containerName `
    -credential $credential `
    -auth $auth `
    -artifactUrl $artifactUrl `
    -databaseServer $databaseServer -databaseInstance $databaseInstance -databaseName $databaseName `
    -databaseCredential $databaseCredential `
    -usessl -installCertificateOnHost `
    -updateHosts

BCContainerHelper.config.json contents:

{
    "bcartifactsCacheFolder": "\\\\vR2-Jendev-FS\\Docker_File_Share\\bcartifacts.cache"
}

Full output of scripts

BcContainerHelper is version 4.0.6
BcContainerHelper is running as administrator
Hyper-V is Disabled
UsePsSession is True
Host is Microsoft Windows Server 2022 Standard - ltsc2022
Docker Client Version is 20.10.9
Docker Server Version is 20.10.9
Removing entries from hosts
Removing bcsqlremote from container hosts file
Removing bcsqlremote-* from container hosts file
Removing Desktop shortcuts
Removing C:\ProgramData\BcContainerHelper\Extensions\bcsqlremote
Downloading application artifact /onprem/21.1.48363.48638/gb
https://bcartifacts.azureedge.net/onprem/21.1.48363.48638/gb
Downloading C:\Users\Dev_TSCOTT\AppData\Local\Temp\5a65c343-c325-4c30-8bf6-33840e1b9714.zip
Unpacking application artifact to tmp folder using 7zip
Downloading platform artifact /onprem/21.1.48363.48638/platform
https://bcartifacts.azureedge.net/onprem/21.1.48363.48638/platform
Downloading C:\Users\Dev_TSCOTT\AppData\Local\Temp\2cd5a19e-295e-4ec0-a564-c5e5ac9bdf6c.zip
Unpacking platform artifact to tmp folder using 7zip
Downloading Prerequisite Components
Downloading \\vR2-Jendev-FS\Docker_File_Share\bcartifacts.cache\onprem\21.1.48363.48638\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHost
ing.exe
Downloading \\vR2-Jendev-FS\Docker_File_Share\bcartifacts.cache\onprem\21.1.48363.48638\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.ms
i
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.1249
Creating Container bcsqlremote
Style: onprem
Multitenant: No
Version: 21.1.48363.48638
Platform: 21.0.48357.48504
Generic Tag: 1.0.2.13
Container OS Version: 10.0.20348.1249 (ltsc2022)
Host OS Version: 10.0.20348.1249 (ltsc2022)
Using process isolation
Using locale en-GB
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Files in C:\ProgramData\BcContainerHelper\Extensions\bcsqlremote\my:
- AdditionalOutput.ps1
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container bcsqlremote from image mcr.microsoft.com/businesscentral:10.0.20348.1249
New-BcContainer Telemetry Correlation Id: beafbb9b-7b0d-4390-9450-81a358a7cad8
DockerDo : docker: Error response from daemon: invalid volume specification: '\\vR2-Jendev-FS\Docker_File_Share\bcartifacts.cache:c:\dl'.
See 'docker run --help'.
ExitCode: 125
Commandline: docker run --volume "\\vR2-Jendev-FS\Docker_File_Share\bcartifacts.cache:c:\dl" --label nav= --env isBcSandbox=N --label version=21.1.48363.48638 
--label platform=21.0.48357.48504 --label country=gb --env artifactUrl=https://bcartifacts.azureedge.net/onprem/21.1.48363.48638/gb --env licenseFile="" --name 
bcsqlremote --hostname bcsqlremote --env auth=Windows --env username="dev_tscott" --env ExitOnError=N --env locale=en-GB --env databaseServer="vr2-jendevsql" --env 
databaseInstance="" --volume "C:\ProgramData\BcContainerHelper:C:\ProgramData\BcContainerHelper" --volume 
"C:\ProgramData\BcContainerHelper\Extensions\bcsqlremote\my:C:\Run\my" --isolation process --restart unless-stopped --env filesOnly=False --env enableApiServices=Y 
--env databaseName="Demo Database BC (21-0)" --env useSSL=Y --volume "c:\windows\system32\drivers\etc:C:\driversetc" --env securePassword=76492d1116743f0423413b16050
a5345MgB8AEMAbQB1AFEATQBOADgAMABtAGYAdQBtAHgARgBvAHcAYgBNAEkALwBIAEEAPQA9AHwAZgBmADUAMABlADEANAAxAGQANwA5AGEAMQA5ADgAMgA0ADUAMwBlADMAZgAyAGIAMAAxADIAZgA1ADcAZABkADMA
MgAzADYAYgBhADcANgBmADgAOQBkAGMAOQBlADkANABmADAAYgA2ADYAMgAwADIAMAAyADUAYgA2ADkAYgBhADAANQAzAGYAZgA2ADcAOAA3AGUAZAAxADkAMgBjADMAMABkAGIAMwBjAGIAMgA5ADMAYgBlAGEANgAxA
DkANQA0ADAAOQBlADUAMwA3ADcAYwA0ADMANQAyADMANQA4AGYANQA1AGUAOAA4ADUAMQBjADcAZABmADUAYwA1AA== --env passwordKeyFile="c:\run\my\aes.key" --env removePasswordKeyFile=Y 
--env databaseUsername=Docker --env databaseSecurePassword=76492d1116743f0423413b16050a5345MgB8AGkAaABSADEAdABVAFoATwBPAFYAegBxAEQAeQBLADAAOQBqADEAeAArAGcAPQA9AHwAZA
BlADcAZABhADMAZAA5ADgAMQBiADMAOAA5ADQAZABjADUAZgBkADQAMQA0AGYAZAAwAGYAMgBjAGYAMwBmADEANAA3AGEAZQBlAGYAMAA0AGUAOQA4AGIAZgAwAGMAOAAzAGYANgA4AGUAZgBkADIANAA2ADkAZAAzADM
AMgAzAGIAZQAyADAAYwAxADEAZABhADUANQBmADUAOAAyAGQAZAAxADYAOABlADAAYQBiADMAMAA3ADgAMQAyADUA --env encryptionSecurePassword=76492d1116743f0423413b16050a5345MgB8AGkAaABS
ADEAdABVAFoATwBPAFYAegBxAEQAeQBLADAAOQBqADEAeAArAGcAPQA9AHwAZABlADcAZABhADMAZAA5ADgAMQBiADMAOAA5ADQAZABjADUAZgBkADQAMQA0AGYAZAAwAGYAMgBjAGYAMwBmADEANAA3AGEAZQBlAGYAM
AA0AGUAOQA4AGIAZgAwAGMAOAAzAGYANgA4AGUAZgBkADIANAA2ADkAZAAzADMAMgAzAGIAZQAyADAAYwAxADEAZABhADUANQBmADUAOAAyAGQAZAAxADYAOABlADAAYQBiADMAMAA3ADgAMQAyADUA --env 
accept_eula=Y --env accept_outdated=Y --detach mcr.microsoft.com/businesscentral:10.0.20348.1249
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.6\ContainerHandling\New-NavContainer.ps1:1933 char:15
+ ...       if (!(DockerDo -accept_eula -accept_outdated:$accept_outdated - ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,DockerDo```

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
- does it happen all the time?
- did it use to work?
@freddydk
Copy link
Contributor

It looks like docker doesn't support a UNC path as a volume to a container.
You could try mapping a drive and see whether that works, but maybe you will find that this degrades the performance significantly - I don't know.
If this doesn't work, it is not something I will work on fixing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants