Useful Commands in You Day-to-Day Development With Docker Containers

Hi guys!

Was coding today with InterSystems IRIS in a docker container and decided to share with you the commands you may find useful in everyday coding.

# docker-compose build

command to build a container. Remember, it is useful if you have dockerfile in the repo.

if the build is successful call the following to launch it:

# docker-compose up -d

Find IRIS management portal on:

localhost:port/csp/sys/%25CSP.Portal.Home.zen?$NAMESPACE=%25SYS

where the port is what you set in docker-compose.yml - 52775 in this case.

Run the following if you want to launch a terminal session inside IRIS container:

# docker-compose iris iris session iris

gfhj gj 


sdfdsfsdf





USER>

And run the following to shut down the container:

# docker-compose down

Troubleshooting

Sometimes something doesn't work as expected.

If it fails to build the container try to build with no cache:

docker-compose build --no-cache


If it continues to show errors try to free the docker space:

docker system prune -f

If you build the container and see the following error:

Error: ERROR #5002: ObjectScript error: <PROTECT>STARTUP+26^STU ^SYS("DSONLY","Environment"),/usr/irissys/mgr/

just rebuild the container again with:

docker-compose build --no-cache

To try the commands you are welcome to play with this, this or that repositories. "Git clone" it on your laptop and the commands listed above will work.

Happy coding with InterSystems IRIS and docker!

 

 

Comments

Another useful command to load into local docker  just downloaded from WRC new release of IRIS:

# docker load -i ~/Downloads/iris-2019.3.0.302.0-docker.tar.gz

Good post!

As a extra comments to save some time,  you can run 

docker-compose up -d

and it will do the build  automatically (so no need to run build, although is useful if you find problems)

And  

# docker iris iris session iris

instead of docker-compose (just saving a few keystrokes) :-D

Thanks, Mario!

docker-compose up -d

I think this goes as the 2nd command in my post?

# docker iris iris session iris

Right!

Even less if you have a Docker Extension in VSCode and right click on a container to open the shell in container. In this case you can run:

# iris session iris

Two(!) commands less ;)

Details could be found here

Yes!

It is the second command (and you don't need the first one, go directly to the docker-compose up , it will do the build if needed. 

And good catch with VS code, I also use it for sessions, stop/start containers and prune!