Why do you need to restart IRIS in a working docker container? If you need to change something in a container the typical approach is to rebuild the container's image and deploy it again. 

It looks like you are trying to reinvent some approach working with remote servers to containers.

Why not using the best practice for containers and leverage it's power?

What is the idea where you need SSH access and IRIS restarts with containers on a constant basis?

And it looks like that if I want to create a database I need to have two entries:

SYS.Databases and

Databases.

Here is the minimal config to create IRISAPP namespace with one database IRISAPP in /irisapp folder.

{
    "Defaults":{
        "DBDIR" : "${MGRDIR}",
        "DBDATA" : "${DBDIR}irisapp/"
    },
    "SYS.Databases":{
        "${DBDATA}" : {}
    },
    "Databases":{
        "IRISAPP" : {
            "Directory" : "${DBDATA}"
        }
    },
    "Namespaces":{
        "IRISAPP": {
            "Globals":"IRISAPP"
        }
    }
    }

Works.

I use it in the following way to set up a docker container before loading the ZPM dev module into it.

And we updated the images with ZPM 0.2.14 too:

intersystemsdc/iris-community:2020.3.0.221.0-zpm

intersystemsdc/iris-community:2020.4.0.547.0-zpm

intersystemsdc/iris-ml-community:2020.3.0.302.0-zpm

intersystemsdc/irishealth-community:2020.3.0.221.0-zpm

intersystemsdc/irishealth-community:2020.4.0.547.0-zpm

And to launch IRIS do:

docker run --rm --name my-iris -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/iris-community:2020.3.0.221.0-zpm

docker run --rm --name my-iris -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/iris-community:2020.4.0.547.0-zpm

docker run --rm --name my-iris -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/iris-ml-community:2020.3.0.302.0-zpm

docker run --rm --name my-iris -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/irishealth-community:2020.3.0.221.0-zpm

docker run --rm --name my-iris -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/irishealth-community:2020.4.0.547.0-zpm

And for terminal do:

docker exec -it my-iris iris session IRIS

and to start the control panel:

http://localhost:9092/csp/sys/UtilHome.csp

To stop and destroy container do:

docker stop my-iris

Just to give my 5 cents on this: it's not great to suggest unsupported approaches to solve problems.

But for us it is always great feedback what features we could include the support for in the product. 

@Vitaliy.Serdtsev , thank you for your continuous willingness to help developers to solve their issues.

@Vic Sun your point is very fair - it's almost impossible to support unsupported usage and it can cause unpredictable problems. 

Thank you all!