github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/scripts/canal/docker/Dockerfile (about)

     1  FROM canal/osbase:v2
     2  
     3  # Solve the problem that centos 6.0 cannot yum install.
     4  RUN sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf
     5  RUN mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
     6  COPY CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo
     7  RUN yum clean all
     8  RUN yum makecache
     9  
    10  # Install mysql client.
    11  RUN rpm -ivh https://repo.mysql.com/mysql57-community-release-el6-11.noarch.rpm
    12  # See: https://support.cpanel.net/hc/en-us/articles/4419382481815?input_string=gpg+keys+problem+with+mysql+5.7
    13  RUN rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
    14  RUN yum install mysql-community-client.x86_64 -y
    15  
    16  WORKDIR /root
    17  RUN wget https://github.com/alibaba/canal/releases/download/canal-1.1.5/canal.adapter-1.1.5.tar.gz
    18  RUN tar xf canal.adapter-1.1.5.tar.gz
    19  COPY . .
    20  RUN chmod 777 start.sh
    21  
    22  CMD ["/bin/sh", "./start.sh"]
    23