How do disable SSL/security using a single line npm script on start

I have a bunch of testing tools from elasticsearch that don’t have any security options - I’d also like to be able to use the downloadable OS image for docker. I currently run my docker image with:

docker run --name opensearch -p 9200:9200 -p 9600:9600 -e 'discovery.type=single-node' opensearchproject/opensearch:latest

Is there a way to disable the security/ssl with this method? I did see this similar post How to disable SSL locally? which failed but wondering if I can pass a file as an argument? I’d like to avoid creating or sshing into the image,

Update - so passing -e 'DISABLE_SECURITY_PLUGIN=true to script does yield a “Disabling OpenSearch Security Plugin” message. Its also necessary to now use http instead of https in the host else we get this error:

 ConnectionError: write EPROTO 4652529152:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:

So full line:

docker run --name opensearch -p 9200:9200 -p 9600:9600 -e 'discovery.type=single-node' -e 'DISABLE_SECURITY_PLUGIN=true' opensearchproject/opensearch:2.0.0"

And client:

return new Client({
      node: 'http://localhost:9200', 
      ssl: { 
        rejectUnauthorized: false

Updated to remove creds as per next comment

@cyberwombat You don’t need credentials as you’ve disabled the security plugin.
This should work.

curl http://localhost:9200

Oh right - yes of course. I had them when I was trying to get it to work and didn’t think to remove them. Thanks!