kayac / go-katsubushi

ID generator server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker image cannnot use `-redis` option

joker1007 opened this issue · comments

Current Dockerfile defines worker_id env.
If worker_id env is defined, katsubushi ignores -redis option.
Because envToFlag is processed at last of option parsing.
Unless user unsets worker_id by any way, cannot use -redis option.
I think it is not good.

A workaround is available, for example set worker_id=0 and redis=redis://......

But certainly that is confusing. We have been fixed Dockerfile in v1.5.0. (#32)
Now we can run simply asdocker run katsubushi/katsubushi:v1.5.0 -worker-id 1 or katsubushi/katsubushi:v1.5.0 -redis redis://.....

I see.
Thanks for your response!!