Unknown Flag while executing docker run command

While trying to execute docker run command with extra parameters I receive Unknown Flag error. For example

docker run -d --restart unless-stopped --stop-timeout 300 \
    -p 28967:28967/tcp \
    -p 28967:28967/udp \
    -p 192.168.50.212:14001:14001 \
    -e WALLET="0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    -e EMAIL="xxxxx@gmail.com" \
    -e ADDRESS="1xx.2xx.3xx.4xx:28967" \
    -e STORAGE="6.5TB" \
    --pieces.enable-lazy-filewalker=false \
    --storage2.piece-scan-on-startup=true \
    --user $(id -u):$(id -g) \
    --mount type=bind,source=/mnt/storjnode_1/identity,destination=/app/identity \
    --mount type=bind,source=/mnt/storjnode_1/data,destination=/app/config \
    --name storagenode_1 storjlabs/storagenode:latest

I receive error

unknown flag: --pieces.enable-lazy-filewalker

Usage:  docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

Run 'docker run --help' for more information

How do I fix this?

Also how to pre-set the paths for “orders”, “retain”, “trust-cache.json”, “revocations.db” & “config.yml” before starting a new node?

Thank you!

unknown flag? looks correct, are you running a release candidate version?
re: pre-set paths, by default wherever the .exe path/config.yaml resides; however, the specific config variables are as follows:
storage2.order.path
storage2.trust.cache-path
server.revocation-dburl
log.output
“retain” .. I dunno, but again default.
Should be no need to “pre-set” any of those.

2 cents,
Julio
P.S. I don’t run Docker

1 Like

Parameters to container must go after image name. Before that – are parameters to docker. Docker does not know what --pieces.enable-lazy-filewalker is, it is not a valid parameter.

It told you pretty much the same verbatim in the error message you quoted, and suggested the fix.

3 Likes

I used

curl -sSL https://get.docker.com/ | CHANNEL=stable bash

to install docker community edition.

And by default “orders”, “retain”, “trust-cache.json”, “revocations.db” & “config.yml” all files created in Node HDD instead of SSD.

BTW you may want to consider podman instead docker. Much more lightweight, integrates with systemd, no need for “watchtower”, etc..

2 Likes

I will look into that. Thanks!