CN

Clone PolarDB-X SQL repo and execute docker_build.sh: https://github.com/polardb/polardbx-sql/blob/main/docker_build.sh

DN

FROM centos:7

# Install essential utils
RUN yum update -y && \
    yum install sudo hostname telnet net-tools vim tree less libaio numactl-libs python3 -y && \
    yum clean all && rm -rf /var/cache/yum && rm -rf /var/tmp/yum-*

# Remove localtime to make mount possible.
RUN rm -f /etc/localtime

# Create user "mysql" and add it into sudo group
RUN useradd -ms /bin/bash mysql && \
    echo "mysql:mysql" | chpasswd && \
    echo "mysql    ALL=(ALL)    NOPASSWD: ALL" >> /etc/sudoers

# Install polardbx engine's rpm, use URL to reduce the final image size.
ARG POLARDBX_ENGINE_RPM_URL=<url-to-dn-rpm-package>.rpm

RUN yum install -y ${POLARDBX_ENGINE_RPM_URL} && \
    yum clean all && rm -rf /var/cache/yum && rm -rf /var/tmp/yum-* # && \
    # mv /u01/xcluster80_current/* /opt/galaxy_engine/ && rm -rf /u01

# Target to polardbx engine home.
WORKDIR /opt/galaxy_engine

# Setup environment variables.
ENV POLARDBX_ENGINE_HOME=/opt/galaxy_engine
ENV PATH=$POLARDBX_ENGINE_HOME/bin:$PATH

ENTRYPOINT mysqld
  1. Store the Dockerfile above
  2. Build the rpm package
  3. Execute the command below:
docker build --build-arg POLARDBX_ENGINE_RPM_URL=${POLARDBX_ENGINE_RPM_URL} -t polardbx-engine .

CDC

Clone the git repo and execute build.sh: https://github.com/polardb/polardbx-cdc/blob/main/docker/build.sh

results matching ""

    No results matching ""