From 9ea5a95ddb271bc4544de8e51f72a16f60ffc9b7 Mon Sep 17 00:00:00 2001 From: ehlxr Date: Wed, 8 May 2019 18:10:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=99=E7=82=B9=E6=9B=B4=E6=96=B0=EF=BC=9A20?= =?UTF-8?q?19-05-08=2018:10:47?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etcd/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etcd/Dockerfile b/etcd/Dockerfile index 0e24f98..52264c7 100644 --- a/etcd/Dockerfile +++ b/etcd/Dockerfile @@ -10,13 +10,14 @@ ENV NODE_NAME=node1 ENV CLUSTER=${NODE_NAME}=http://${IP}:2380 ENV TOKEN=my-etcd-token ENV CLUSTER_STATE=new +ENV ETCDCTL_API=3 VOLUME [ "${DATA_DIR}" ] RUN wget ${ETCD_DOWNLOAD_URL}/${ETCD_VER}/etcd-${ETCD_VER}-linux-amd64.tar.gz \ && tar -xzvf etcd*.tar.gz \ && mv etcd*/etcd /usr/local/bin/ \ - # && mv etcd*/etcdctl /usr/local/bin/ \ + && mv etcd*/etcdctl /usr/local/bin/ \ && rm -rf etcd* \ && mkdir -p ${DATA_DIR} \ # Alpine Linux doesn't use pam, which means that there is no /etc/nsswitch.conf, @@ -31,4 +32,5 @@ CMD ["sh", "-c", "etcd --data-dir ${DATA_DIR} --name ${NODE_NAME} \ --initial-advertise-peer-urls http://${IP}:2380 --listen-peer-urls http://${IP}:2380 \ --advertise-client-urls http://${IP}:2379 --listen-client-urls http://${IP}:2379 \ --initial-cluster ${CLUSTER} \ - --initial-cluster-state ${CLUSTER_STATE} --initial-cluster-token ${TOKEN}"] \ No newline at end of file + --initial-cluster-state ${CLUSTER_STATE} --initial-cluster-token ${TOKEN} \ + --auto-compaction-retention=1"] \ No newline at end of file