question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

not able to run docker image using '-it' in the run command

See original GitHub issue

Hi

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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
toxophilistcommented, Jun 18, 2020

@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.

0reactions
toxophilistcommented, Jun 26, 2020

@sumit103 You just need port 80 for the browser access

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to run docker image with docker run command
You might try running a debug shell on your image, docker run --rm -it gcr.io/... /bin/bash . Once you're in that shell, try...
Read more >
docker run - Docker Documentation
The docker run command first creates a writeable container layer over the specified image, and then starts it using the specified command.
Read more >
How To Use docker exec to Run Commands in ... - DigitalOcean
The No such container error means the specified container does not exist, and may indicate a misspelled container name. Use docker ps to...
Read more >
Docker Exec - How to Run a Command Inside a Docker Image ...
Let's say you have a Dockerfile for an image you are trying to build. Normally what happens is that when running docker build...
Read more >
How to Use Docker Run Command with Examples
Accordingly, run is now a subcommand of docker container and to use it you must type docker container run. Although Docker still supports...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found