Question
· Jan 31, 2019

Why does my IRIS container exit on creation after adding additional varibles in the cmd

When I run the following cmd in Ubuntu 18.04

the container is created and stays running

But when I run this cmd, the container is created but exits immediately

Not sure why it is doing this.  if anyone can shed some light, it would be most appreciated.

Discussion (17)1
Log in or sign up to continue

if you run "sudo docker logs iristest2" do you have any logs?  Also I notice that you are running your docker commands via sudo...  Have you thought about adding the docker group (if you don't have one) and adding your user to the docker group, and then restarting your session, so that you don't have to use sudo (see below).  I'm wondering if you are having a permission issue with the volume

  1. sudo groupadd docker
  2. sudo usermod -aG docker $USER

You're sort of back to where you were before, with Docker switches occurring after the image name, although you now have the image name in there twice. I don't have your environment, so I can't test this exact command, but I think you want something like this:

    docker run -d --privileged -v /nfs/IRIS:/IRIS \
    --env ISC_DATA_DIRECTORY=/IRIS/iconfig \
    --env ICM_SENTINEL_DIR=/license \
    -p 52774:52774 --name IRIS4 efca5c59cbb7 \
    --key /IRIS/iris.key ...

If you're still having trouble, back up and build the command line incrementally. Start simple:

    docker run -d --name IRIS4 efca5c59cbb7

Then add in your Docker switches (-v, -e, -p, etc.), and finally add in the IRIS arguments (--key, etc.). That way you can tell which switch or argument is causing a problem.

Hi Jon

1.  docker run -d --name IRIS2 efca5c59cbb7

2.  docker run -d --name IRIS2 efca5c59cbb7 -p 52774:52774

3. docker run -d --name IRIS2 efca5c59cbb7 -p 52774:52774 -v /nfs/IRIS:/IRIS

4. docker run -d --name IRIS2 efca5c59cbb7 -p 52774:52774 -v /nfs/IRIS:/IRIS --ENV ISC_DATA_DIRECTORY=/IRIS/iconfig

5.  docker run -d --name IRIS2 efca5c59cbb7 -p 52774:52774 -v /nfs/IRIS:/IRIS --ENV ISC_DATA_DIRECTORY=/IRIS/iconfig --env ICM_SENTINEL_DIR=/license IRIS

6. docker run -d --name IRIS2 efca5c59cbb7 -p 52774:52774 -v /nfs/IRIS:/IRIS --ENV ISC_DATA_DIRECTORY=/IRIS/iconfig --env ICM_SENTINEL_DIR=/license IRIS --key /IRIS/iris.key

7. docker run -d --name IRIS2 efca5c59cbb7 -p 52774:52774 -v /nfs/IRIS:/IRIS --ENV ISC_DATA_DIRECTORY=/IRIS/iconfig --env ICM_SENTINEL_DIR=/license IRIS --key /IRIS/iris.key --before /usr/irissys/dev/Cloud/ICM/changePassword.sh /IRIS/password.txt

All created fine but all exit on creation

So have also tried.

8. docker run -d --privileged -v /nfs/IRIS:/IRIS --env ISC_DATA_DIRECTORY=/IRIS/iconfig --env ICM_SENTINEL_DIR=/license iris --name IRIS4 efca5c59cbb7 -p 52774:52774 --key /IRIS/iris.key --before /usr/irissys/dev/Cloud/ICM/changePassword.sh /IRIS/password.txt

than tried this --env ICM_SENTINEL_DIR=/license instead of --env ICM_SENTINEL_DIR=/license iris

9. docker run -d --privileged -v /nfs/IRIS:/IRIS --env ISC_DATA_DIRECTORY=/IRIS/iconfig --env ICM_SENTINEL_DIR=/license --name IRIS4 efca5c59cbb7 -p 52774:52774 --key /IRIS/iris.key --before /usr/irissys/dev/Cloud/ICM/changePassword.sh /IRIS/password.txt

Take heart, I think you're getting close. I think all you need now is to quote the arguments to the --before switch, as shown in the documentation:

    --before "/usr/irissys/dev/Cloud/ICM/changePassword.sh /IRIS/pwd.txt"

If you're still having trouble, build up the command incrementally, as I previously suggested, being careful to follow the correct form of the command.

Dmitry's answer about looking at log files will also give you more information than simply noticing in docker ps that the container has exited.

Weirdly enough I just noticed about 10 mins ago on my document I have missed the " on the password cmd. So ran it and got this

thought great than checked the logs and got the following

im just redownloading the license key now, just going to re run the image creation with the latest release, just in case the license is version specific

I'm finding it hard to read the output images, but every one of the commands that you listed has a Docker option after the image name. The form of the command should be:

    docker run <Docker opts> image_name <IRIS args>

To be clear, the -e (--env), -p (--publish), and -v (--volume) switches are Docker options; they go before the image name. The --key and --before switches are IRIS arguments; they go after the image name.