Logstash is not accessable outside of the docker container

Hi,,
I build the docker image for the logstash using the "apt-get install logstash".
I can able to run the image successfully, but i am unble to access the
localhost:9600/?pretty
outside of the container
https://artifacts.elastic.co/packages/7.x/
this is the artifacts i am using