# piplus v5 Canal Dockerfile

FROM centos:7
MAINTAINER focus <focus@hudongpai.com>

# Install myCat.
RUN \
  	yum install -y java-1.8.0-openjdk.x86_64 && \
  	yum install -y wget && \
  	cd /opt && \
  	wget https://git.wxpai.cn/piplus-backend-v5/piplus-backend-v5-download/raw/master/canal.deployer-1.0.22.tar.gz && \
  	mkdir /opt/canal && \
  	tar zxvf canal.deployer-1.0.22.tar.gz -C /opt/canal && \
  	rm -rf /opt/canal/conf && \
  	ls -l /opt


# Add src
ADD conf /opt/canal/conf

# Define mountable directories.
VOLUME ["/opt/canal/conf"]

# Expose ports.
EXPOSE 8066

# Define working directory.
WORKDIR /opt/canal/bin

# Define default command.
CMD ["startup.sh"]