Rate This Document
Findability
Accuracy
Completeness
Readability

Installing Docker

  1. Optional: If wget is not installed, install it first. Otherwise, skip this step.
    yum install wget
  2. Install Docker and import the basic image. For details, see Docker Installation Guide (CentOS & openEuler) .
    cd /opt
    wget --no-check-certificate https://mirrors.huaweicloud.com/openeuler/openEuler-22.03-LTS-SP4/docker_img/aarch64/openEuler-docker.aarch64.tar.xz
    docker load < openEuler-docker.aarch64.tar.xz
  3. Create a Docker network in bridge mode.
    docker network create -d bridge flink-network

  4. Create three Docker containers with the 8c32g specification. Name them flink_jm_8c32g, flink_tm1_8c32g, and flink_tm2_8c32g, start them, and exit.
    docker run -it -d -v /usr/lib64:/usr/lib64 --name flink_jm_8c32g --privileged --cpus=8 --memory=32g --network flink-network -p 0.0.0.0:8081:8081 openeuler-22.03-lts-sp4 /bin/bash 
    docker run -it -d -v /usr/lib64:/usr/lib64 --name flink_tm1_8c32g --privileged --cpus=8 --memory=32g --network flink-network openeuler-22.03-lts-sp4 /bin/bash 
    docker run -it -d -v /usr/lib64:/usr/lib64 --name flink_tm2_8c32g --privileged --cpus=8 --memory=32g --network flink-network openeuler-22.03-lts-sp4 /bin/bash 
  5. Query the container IDs, which are located in the first column.
    docker ps

  6. Log in to all containers, enable the SSH service in the containers, and configure password-free login.
    1. Log in to the containers in sequence and perform 6.b to 6.g in 6.
      docker exec -it flink_jm_8c32g /bin/bash 
      docker exec -it flink_tm1_8c32g /bin/bash 
      docker exec -it flink_tm2_8c32g /bin/bash 
    2. Install the SSH service dependency, password change dependency, command editing dependency, command search dependency, and network management dependency. If other dependencies are missing in the image, install them by yourself.
      yum -y install openssh-clients openssh-server passwd vim findutils net-tools libXext libXrender gcc cmake make gcc-c++ unzip
    3. Generate an RSA key.
      ssh-keygen -A
    4. Enable the SSH service in the container.
      /usr/sbin/sshd -D &
    5. Set a password for the container.
      # Set the password of the current user. Remember the password.
      passwd
    6. Generate an RSA key again. When a message is displayed, press Enter.
      ssh-keygen -t rsa
    7. Exit from the container.
      exit
    8. On the flink_jm_8c32g container, enable SSH password-free login to other containers.
      docker exec -it flink_jm_8c32g /bin/bash 
      ssh-copy-id -i ~/.ssh/id_rsa.pub root@flink_tm1_8c32g
      ssh-copy-id -i ~/.ssh/id_rsa.pub root@flink_tm2_8c32g