-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPFS key rotate is tricky in docker environment #7714
Comments
Official docker images from https://hub.docker.com/r/ipfs/go-ipfs/tags/ supports passing arbitrary # given container named 'ipfs-test' persists repo at /path/to/persisted/.ipfs
$ docker run -d --name ipfs-test -v /path/to/persisted/.ipfs:/data/ipfs ipfs/go-ipfs:v0.7.0
$ docker stop ipfs-test
# key rotation works like this (old key saved under 'old-self')
$ docker run --rm -it -v /path/to/persisted/.ipfs:/data/ipfs ipfs/go-ipfs:v0.7.0 key rotate -o old-self -t ed25519
$ docker start ipfs-test # will start with new key Hope this helps. I'm closing this, as we discussed this during weekly triage, and introducing additional complexity to the codebase to support "pending config updates" is not worth it if the above viable solution exists. |
Well, that works indeed. A "pending config updates" is more user friendly ;) |
* docs(readme): key rotation in docker Adds notes from #7714 (comment)
Hi,
I'm now running ipfs 0.7.0 in a docker container to not be reliant on my distribution with regards to updates.
IPFS itself works really well in docker these days, hats of to all the awesome improvements in 0.7.0!
Next i wanted to rotate my key to the shiny new ed25519!
So i typed:
docker exec ipfs_host ipfs key rotate -o self -t ed25519
This gave the following error:
What it asks there, execute a command without running ipfs, is really not easy to do in docker!
Yes, i can do it. Just starting a new container with a different entrypoint and making it interactive will give me a container where i can jump in do as the command asks.
This isn't very user friendly and requires a bit of hassle to get working.
It might be better for IPFS to "remember" that i want to execute that command and that IPFS runs it on it's own when IPFS restarts.
The error then should tell me something like: "Restart IPFS to apply these changes" or something alike. That would make it perfectly usable in docker environments.
Cheers,
Mark
The text was updated successfully, but these errors were encountered: