Based on the documentation from Docker, I noticed that if I want to inspect the content files of my Elasticsearch container, I need to use the run
command with the -it
tag. However, after some Googling someone also recommended that I use sh
in my command (link in background section). I understand that sh
is used to create a shell for me to interact with, but how does it work under the hood? Does it link together with the tty that is created from the -it
tag? Is sh
referring to the linux-based sh
command, a docker sh
command, a path, or something entirely different? How does docker know what I mean by sh
and where can I find documentation on this?
I used this post as a reference for knowing what command to use: How to see docker image contents
The command I mentioned in my post:
$ docker run -it docker.elastic.co/elasticsearch/elasticsearch:7.3.1 sh