Trouble accessing docker interactive mode image (Docker noob)

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

intersect

Posted 2019-10-17T19:26:35.480

Reputation: 1

Also see this if you created your images from scratch: https://stackoverflow.com/questions/29535015/error-cannot-start-container-stat-bin-sh-no-such-file-or-directory

– Narzard – 2019-10-17T20:02:22.713

Answers

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

Eduardo Baitello

Posted 2019-10-17T19:26:35.480

Reputation: 178

Thank you, this solved problem. – intersect – 2019-10-17T20:03:07.623