打包环境centos7.9
下载项目源代码
git clone git@github.com:RedisLabs/redis-cluster-proxy.git
进入项目目录:
cd redis-cluster-proxy
编译
make PREFIX=/usr/local/redis_cluster_proxy install
注:未安装git:
yum install git
注:gcc版本小于5,需要执行以下命令
gcc -v
yum install centos-release-scl
yum install devtoolset-7-gcc*
scl enable devtoolset-7 bash
gcc -v
拷贝redis-cluster-proxy到当前目录:
cp /usr/local/redis_cluster_proxy/bin/redis-cluster-proxy .
创建Dockerfile文件:
vim Dockerfile
FROM centos:7
WORKDIR /data
ADD redis-cluster-proxy /usr/local/bin/
EXPOSE 7777
打包文件:
docker build . -t nuptaxin/redis-cluster-proxy:v1.0.0
上传镜像:
docker push nuptaxin/redis-cluster-proxy:v1.0.0
查看镜像:
https://hub.docker.com/r/nuptaxin/redis-cluster-proxy/tags