etcd server v0.3.0 running in busybox under 20MB.
4.4K
Build a etcd server docker image under 30MB. The image contain the etcd and etcdctl binaries.
etcd v2.2.3
docker pull jllopis/etcd:2.2.3
This tiny image starts etcd with the default configuration.
Use the provided Makefile to download the binaries and build the image.
$ make image
The above command clean up the previous files if any, download the binaries from github, unpack it and build the docker image.
You can get help by running
$ make
docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
my_user/etcd 2.2.3 846344ecbfec 4 minutes ago 28.92 MB
jllopis/redis latest 084ebf298232 26 hours ago 502.4 MB
base latest f28c2cabcb3e 30 hours ago 478.3 MB
ubuntu 12.04 9cd978db300e 3 weeks ago 204.4 MB
To start the container execute:
docker run -v local_fs:/data -h {node_host_name} -name {image_name} -p 4001:4001 -p 7001:7001 -p 2379:2379 -p 2380:2380 jllopis/etcd:2.2.3
where:
It is also possible to map other ports on the host. Do it adding -p local_port:container_port to docker run:
docker run -d -p 4242:4001 -v local_fs:/data jllopis/etcd:2.2.3
The ports used are:
Remember that if you want access from outside the container you must explicitly tell docker to do so by setting -p at image launch.
You can not login to the image as it just contain the binaries. Should be no need to do it anyway.
The command is packed with the image. Can run with:
docker run --rm -ti -entrypoint "/etcdctl" jllopis/etcd:2.2.3 -v
Content type
Image
Digest
sha256:58879fe7d…
Size
7.3 MB
Last updated
over 10 years ago
docker pull jllopis/etcd