not able to run docker image using '-it' in the run command
See original GitHub issueHi
I am trying to setup okit but in the last command which i use
sudo docker run -it --rm -p 80:80
–name okit
–hostname okit
-v ~/.oci:/root/.oci
-v pwd
/okitweb:/okit/okitweb
-v pwd
/visualiser:/okit/visualiser
-v pwd
/log:/okit/log
okit
I am m stuck after this command. The command does not execute properly and just stays at
Successfully tagged okit:latest [opc@okit-instance oci-designer-toolkit]$ sudo docker run -it --rm -p 80:80 \
--name okit \ --hostname okit \ -v ~/.oci:/root/.oci \ -v `pwd`/okitweb:/okit/okitweb \ -v `pwd`/visualiser:/okit/visualiser \ -v `pwd`/log:/okit/log \ okit
[2020-06-17 17:42:34 +0000] [1] [INFO] Starting gunicorn 20.0.4 [2020-06-17 17:42:34 +0000] [1] [INFO] Listening at: http://0.0.0.0:80 (1) [2020-06-17 17:42:34 +0000] [1] [INFO] Using worker: sync [2020-06-17 17:42:34 +0000] [8] [INFO] Booting worker with pid: 8 [2020-06-17 17:42:34 +0000] [9] [INFO] Booting worker with pid: 9
after closing the command i get:
^C[2020-06-17 17:43:03 +0000] [1] [INFO] Handling signal: int [2020-06-17 17:43:03 +0000] [8] [INFO] Worker exiting (pid: 8) [2020-06-17 17:43:03 +0000] [9] [INFO] Worker exiting (pid: 9) [2020-06-17 17:43:03 +0000] [1] [INFO] Shutting down: Master
and when I use the above command with -d, it shows:
[opc@okit-instance oci-designer-toolkit]$ sudo docker run -d --rm -p 80:80 \
--name okit \ --hostname okit \ -v $OCI_CONFIG_DIR:/root/.oci:Z \ -v $OKIT_ROOT_DIR/okitweb:/okit/okitweb:Z \ -v $OKIT_ROOT_DIR/visualiser:/okit/visualiser:Z \ -v $OKIT_ROOT_DIR/log:/okit/log:Z \ okit
b6d01ccf2e9f7437dcfaed9394284953f587587ad139ff0932847bc66e05149c
But I am still not able to access the okit.
Please help!!! Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
@sumit103 running with
-it
starts the server interactive so when you close the command it shuts down. The-it
is useful for seeing the server errors / whats happening accessing http://localhost/okit/designer will display the designer and if not you should see the error where the command is running.From your command example it looks like you are running this on an oci instance so you could test it by logging in via another terminal and using curl to test the localhost url.
@sumit103 You just need port 80 for the browser access