tidb - binlog - Dockerfile Dockerfile



Dockerfile.pump

FROM hub.htmltoo.com:5000/tidb:binlog
MAINTAINER siddontang
RUN chmod -R  777  /opt/tidb-binlog
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ADD ./run-pump   /opt/tidb-binlog/bin/
ADD ./pump.toml    /conf/
WORKDIR /opt/tidb-binlog
CMD [ "/bin/bash", "-c", "bin/run-pump" ]

run-pump

#!/bin/bash
exec `dirname $0`/pump  -config     /conf/pump.toml


docker build -t pump .

docker tag pump:latest hub.htmltoo.com:5000/tidb:pump

docker push hub.htmltoo.com:5000/tidb:pump


Dockerfile.drainer

FROM hub.htmltoo.com:5000/tidb:binlog-0
MAINTAINER siddontang
RUN chmod -R  777  /opt/tidb-binlog
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
ADD ./run-drainer   /opt/tidb-binlog/bin/
ADD ./drainer.toml    /conf/
WORKDIR /opt/tidb-binlog
CMD [ "/bin/bash", "-c", "bin/run-drainer" ]


run-drainer

#!/bin/bash
exec `dirname $0`/drainer -config    /conf/drainer.toml


docker build -t drainer .

docker tag drainer:latest hub.htmltoo.com:5000/tidb:drainer

docker push hub.htmltoo.com:5000/tidb:drainer


变量:

initial-commit-ts = "0"

pd-urls = "http://pd1:2379,http://pd2:2379,http://pd3:2379"


# base

FROM golang:1.14-alpine3.11

apk update && apk upgrade 

apk --update --no-cache add net-tools git curl axel wget vim make bash gcc g++ build-base

apk --update --no-cache add unzip zip cmake autoconf automake libtool supervisor

apk update && apk upgrade

mkdir /opt/tidb-binlog && cd /opt/tidb-binlog

wget https://github.com/pingcap/tidb-binlog/archive/v3.0.9.zip  &&  unzip v3.0.9.zip  &&  rm -rf v3.0.9.zip && mv tidb-binlog-3.0.9  tidb-binlog

cd tidb-binlog && mv *  ../  &&  cd ../ && make build


docker commit -m="update" -a="domsn.com" 69d1128622 hub.htmltoo.com:5000/tidb:binlog  # 提交本地新镜像

docker push hub.htmltoo.com:5000/tidb:binlog


签名:这个人很懒,什么也没有留下!
最新回复 (0)
返回