1. 制作 etcd 镜像

根据自己对 etcd 的版本要求,下载对应的版本来构建镜像。

示例 Dockerfile

FROM alpine

WORKDIR /tmp

EXPOSE 2379/tcp
EXPOSE 2380/tcp

ADD http://cncfstack-download.oss-cn-hangzhou.aliyuncs.com/etcd/v3.4.14/etcd-v3.4.14-linux-amd64.tar.gz  ./

RUN tar xf etcd-v3.4.14-linux-amd64.tar.gz && \
    cp etcd-v3.4.14-linux-amd64/etcdctl /usr/local/bin/etcdctl && \
    cp etcd-v3.4.14-linux-amd64/etcd /usr/local/bin/etcd

构建镜像

docker build -t registry.cn-hangzhou.aliyuncs.com/cncfstack/mywiki-etcd:v1-20201229 .

推送镜像到镜像仓库

docker push registry.cn-hangzhou.aliyuncs.com/cncfstack/mywiki-etcd:v1-20201229
Copyright © 温玉 2021 | 浙ICP备2020032454号 all right reserved,powered by Gitbook该文件修订时间: 2023-10-26 17:23:11

results matching ""

    No results matching ""