当前位置: 代码迷 >> 综合 >> rancher/coreos-etcd:v3.3.15编译arm64版本
  详细解决方案

rancher/coreos-etcd:v3.3.15编译arm64版本

热度:41   发布时间:2024-02-12 23:00:05.0

首先,下载etcd代码

mkdir -p $GOPATH/src/github.com/coreos
cd $GOPATH/src/github.com/coreos
git clone https://github.com/etcd-io/etcd.git
cd etcd
git chechout v3.3.15
make build

如果在arm64环境下,出现如下结果,说明成功

2020-08-20 18:05:34.183276 E | etcdmain: etcd on unsupported platform without ETCD_UNSUPPORTED_ARCH=arm64 set.
make: *** [build] 错误 1

之后,修改Dockerfile-release.arm64为如下内容:

FROM aarch64/ubuntu:16.04
ENV ETCD_UNSUPPORTED_ARCH arm64ADD bin/etcd /usr/local/bin/
ADD bin/etcdctl /usr/local/bin/
RUN mkdir /var/etcd
RUN mkdir -p /var/lib/etcdEXPOSE 2379 2380# Define default command.
CMD ["/usr/local/bin/etcd"]

最后执行如下命令:

docker build -t rancher/coreos-etcd:v3.3.15 -f Dockerfile-release.arm64 .

 

  相关解决方案