I am experimenting with docker on my Synology NAS. And… I got it working… yay!
But since I want to automate the process of building the Container, I need to call the docker command using a shell control.
But when I execute the series of commands, it returns an error:
You likely have init script that set $PATH in Terminal that are not being set through a Shell. There is a switch to login (I think) that will force those scripts to be run, but I typically use that just to locate a tool, then use its full path thereafter.
This is the code we use to locate a particular tool. You can adapt it as needed.
Private Function FindCliApp(cli As String) As FolderItem
dim f as FolderItem
#if TargetMacOS or TargetLinux then
dim sh as new shell
sh.Execute "/bin/bash -lc " + ShellQuote("which " + cli.Trim)
if sh.ErrorCode = 0 then
dim path as string = sh.Result
path = ReplaceLineEndings(path, EndOfLine).Trim
path = path.NthField(EndOfLine, path.CountFields(EndOfLine))
f = new FolderItem(path, FolderItem.PathTypeNative)
end if
#endif
return f
End Function