Studio Uses Super port to connect to DB. And keep connected all the time, when it loses connection it offers to even restart Studio not just reconnect. It can also hang when you doing a big compile.

I would recommend finding a way to migrate to the latest version. And so, you will be able to use VSCode-ObjectScript, which does not care about connection status, you can restart the server, you can do debug and big compile.

If you provisioned IRIS on Google Cloud from marketplace, you should be able to see the same page as on my screenshot. You can press the button Visit the site, which will go you to System Management Portal, where you should be able to login with the default _SYSTEM and SYS, after that it will request you to change the default password. Which you can use in VSCode or Atelier. 

Using VSCode-ObjectScript is very easy to connect to a cloud instance with IRIS.

 Just Use IP address and port from site address, login _SYSTEM and password changed after first connect. 

And write it to file, .vscode/settings.json in your project folder

{
    "objectscript.conn": {
        "active": true,
        "host": "xx.xx.xx.xx",
        "port": 52773,
        "username": "_SYSTEM",
        "password": "123",
        "ns": "USER",
    }    
}

Unfortunately, InterSystems officially does not offer how to deal with docker at all. Where articles from, let's say from you or somebody else, with the ways how to do it the Right way. 

Comments to the repository https://github.com/intersystems/container-tools:

  • 2019.4 already exists and published, but examples still only for 2019.3
  • ZSTART.XML in XML format. Why so, when it should be MAC file
    • quite arguing the decision, to load code in this place
    • endless loop with goto in the code
  • Dockerfile, with a line longer than screen size. 
    • where QuiesceForBundling?

InterSystems say how to run InterSystems products with docker, while nothing about running customer's applications on IRIS with Docker.

What's happens here is, it is how the community works. I have a problem, I don't want to write to much in my Dockerfile. I wrote a lot of them, for many different projects. I need some universal way, for me. I did it, and I update my own template from time to time.

Are you sure that you really need it?

Yes, you have free space in your database but it will be used when the amount of data stored in this database will grow, so, your free space will become less. I have an article with some visualization, how free-space looks like in a kind of real-life. How Compaction works, it good to read it just to know what expect from those actions. 

In short Compact, just should move all free blocks to the end of the database. It does not return this space to system, you then should do Truncate.

I don't know the way how to measure how much time it will take, it depends on many factors. But you can try run FileCompact method, with quite a small TargetFree, get ActualFree, and with the next time increase TargetFree until you reach desired.

Multi-line blocks

It's actually working. And it's because of code from RUN command goes to chosen SHELL as one line without line endings, \ at the end of the line, is not line ending it is line continuation. So, you can write code in Dockerfile visually like multi-line but it is no so.

Error handling

Any error in iris session will change exit code, so, any such error will fail docker build anyway.

So, with, such lines in my Dockerfile

SHELL ["/irissession.sh"]
RUN \
  write !,"Start",! \  
  for i=1:1:10 { \
    write !,"Test Loop",i \ 
  }\
  write !,"Finish",! \
  write !, error

I will get this

Starting IRIS

Node: 24032930b1e3, Instance: IRIS
%SYS>
%SYS>
Start
Test Loop1
Test Loop2
Test Loop3
Test Loop4
Test Loop5
Test Loop6
Test Loop7
Test Loop8
Test Loop9
Test Loop10
Finish

WRITE !,"Start",!   FOR i=1:1:10 {     WRITE !,"Test Loop",i   }  WRITE !,"Finis
h",!   WRITE !, error
                ^
<UNDEFINED> *error
%SYS>
ERROR: Service 'iris' failed to build: The command '/irissession.sh write !,"Start",!   for i=1:1:10 {     write !,"Test Loop",i   }  write !,"Finish",!   write !, error' returned a non-zero code: 1

As you can see, for loop working well, and UNDEFINED error fails to build

I would rather expect that some kind of irissession.sh was implemented by InterSystems. It is a docker build process, InterSystems already added ##class(SYS.Container).QuiesceForBundling() which in fact I would expect it should be called automatically while IRIS stopping during docker build.

I'm against putting all of those container's only lines to Installer manifest, just because of Installer manifests can be used in non-container's environment as well. And those lines need only during docker build.

PS. With 2019.4 this line

do ##class(SYS.Container).SetMonitorStateOK("irisowner")

should not be used (even will give an error), as it is already as part of 

do ##class(SYS.Container).QuiesceForBundling()

1. Faster to type (as you said).

Every developer should think not only about himself but about the next developer, who will have to read his code. You can type it faster when you use IntelliSense, like in any modern IDE. Like we already have it with VSCode-ObjectScript. It now supports extending commands and functions, and I see the near future when it will be able to extend any old-school code, with dots, or inline do.

More compact. Allowing the reader to "see" more of the structure in one go.

So, you say that this very compact code, is readable because you can see all code at once? No, no, no, it makes the code completely unreadable. When you put many commands in one line, with one or even more F and D  it makes so much pain,  to understand what's going on there. And it very fast becomes like a black box, nobody understands how it works, and nobody wants to touch it, just to not break it completely.