$ docker run --rm -it -p 2379:2379 -p 2380:2380 --name etcd chai2010/etcd
$ curl 127.0.0.1:2379/version
$ curl 127.0.0.1:2379/v2/keys
$ curl http://127.0.0.1:2379/v2/keys/message -XPUT -d value="Hello world"
$ curl 127.0.0.1:2379/v2/keys
$ curl http://127.0.0.1:2379/v2/keys/message
# start 3 node, port on :2379/:3379/:4379
$ docker-compose up -d
$ curl 127.0.0.1:2379/version
$ curl 127.0.0.1:2379/v2/keys
$ curl http://127.0.0.1:2379/v2/keys/message -XPUT -d value="Hello world"
$ curl 127.0.0.1:2379/v2/keys
$ curl http://127.0.0.1:2379/v2/keys/message
# get from other etcd node
$ curl 127.0.0.1:3379/v2/keys
# start etcd, 3 nodes
$ docker-compose up -d
# start confd on macOS
# windows: make confd-win
# linux: make confd-linux
$ make confd-macos
# view generated ./conf-data/etc/myapp/myapp.json
# change config value in etcd
$ curl http://127.0.0.1:2379/v2/keys/myapp/database/user -XPUT -d value="new value"
# view generated ./conf-data/etc/myapp/myapp.json
make debug
make test
make clean
The Apache License.
Content type
Image
Digest
Size
25 MB
Last updated
over 8 years ago
docker pull chai2010/etcd