Closed sorsted closed 7 months ago
Docker attach attaches the the main loop, which is a message pump - nothing really to do there.
The reason for your docker exec -it bcserver bash
not working is that bash doesn't exist.
Use PowerShell instead - docker exec -it bcserver powershell
Current generic images use powershell 5 - pwsh is also not installed.
You can also use the BcContainerHelper command Invoke-ScriptInBcContainer, which pre-loads all BC CmdLets, Example:
Invoke-ScriptInBcContainer -containername bcserver -scriptblock {
get-navserverinstance
}
Describe the issue
I installed Business Central in a container using Docker Engine (not Docker Desktop), mostly following this guide: https://www.youtube.com/watch?v=lPKkKbLaQ9Y
The PowerShell script for the installation and its output can be found below.
I would then like to be able to run commands in the container. So I do
docker start bcserver
, which works fine, and then follow up withdocker attach bcserver
. Then nothing happens, and no output ever being produced. So I press Ctrl + C to stop the process and then repeat bothdocker start bcserver
anddocker attach bcserver
. This time, something does happen, namely:And that’s it. No more output is ever produced, and pressing keys yields no reaction.
I also tried
docker exec -it bcserver bash
, but this just yields:Scripts used to create container and cause the issue
Full output of scripts