Docker setup command with settings?

When using docker run \ --rm -e SETUP="true" \ is it possible to add settings parameters for config.yaml within the command? If yes, how can this be done?

No, it’s not possible in normal way. The entrypoint inside the container looks like:

As you can see, nothing custom transferred to the storagenode setup command.

But you can hack it:

docker run -it --rm --entrypoint /app/storagenode \
  --mount type=bind,source=/mnt/storj/storagenode/identity,destination=/app/identity \
  --mount type=bind,source=/mnt/storj/storagenode,destination=/app/config \
  storjlabs/storagenode:latest \
  setup --config-dir config --identity-dir identity --log.output config/storagenode.log

I added --log.output config/storagenode.log in that example

5 Likes

Thanks, I’ll have a look at it.

1 Like