0

I need help with accessing interactive mode of Docker image thanks to lack of knowledge in needed area.

I want open file , and read from file, and use image filesystem (traversal and search).

I think I need interactive mode for that because I haven't succeeded to do that using exec command. (reading from txt file in docker image)

I've been trying to do this for few days and now I have only 1 day left so I desperately ask for help here. I tried to do this both on Docker on Ubuntu and on Windows.

Commands and error messages I tried

- sudo docker run -d x/x:x 
 - docker run -d x/x:x
 - docker run -it x
 - docker run -dit x/x:x
 - docker run -it --entrypoint /bin/bash x
 - docker run -it  x/x:x bash
 - docker run -itd x/x:x sh
 - docker run -it x sh

Pictures better explain those failed attempts (commands and errors). 1 errors ubuntu Docker 2 errors Windows Docker

0

Based on the last error of your pictures, it means that the image used does not has bash installed.

As an alternative, you can open an interactive terminal using sh instead. I tried this with success:

docker run -it cuspajzodgraha/diverto-ctf:spyware /bin/sh

  • Thank you, this solved problem. – intersect Oct 17 at 20:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.