nats-io / nats-server

High-Performance server for NATS.io, the cloud and edge native messaging system.
https://nats.io
Apache License 2.0
15.87k stars 1.4k forks source link

Unknown flags when trying to run the docker image with -js and -sd options #4285

Closed Etherdrake closed 1 year ago

Etherdrake commented 1 year ago

When trying to run the nats docker image with flags found in the docs at https://hub.docker.com/_/nats/ I am receiving errors when trying to use certain flags.

docker run -d --name nats-main -p 4222:4222 -p 6222:6222 -p 8222:8222 -js -sd /home/botmaster/nats/madelineoctopus nats

Output: unknown shorthand flag: 'j' in -js

docker run -d --name nats-main -p 4222:4222 -p 6222:6222 -p 8222:8222 -sd /home/tester/test nats

Output: unknown shorthand flag: 's' in -sd

bruth commented 1 year ago

Hi @SlinkyGopher. Given the commands you provided, you are specifying the nats-specific options before the image name. Try this:

docker run -d --name nats-main -p 4222:4222 -p 6222:6222 -p 8222:8222 nats -js -sd /home/botmaster/nats/madelineoctopus

(moved nats before -js)