Create and Configure Docker Registry

Procedure

  1. From the Plant Applications Web Client installation package, download the DTR.zip file into the machine on which you want to run Docker Registry.
  2. Create a folder named pa-dtr by running the following command: sudo mkdir -p <folder path>/pa-dtr. This folder stores the Docker Registry configuration files.
  3. Create another folder named docker.service.d in the /etc/systemd/system folder by running the following command: sudo mkdir -p /etc/systemd/system/docker.service.d
  4. In the docker.service.d folder that you have created, create a file named http-proxy.conf by running the following command: sudo nano /etc/systemd/system/docker.service.d/http-proxy.conf
  5. Copy the following lines of code into the http-proxy.conf file, replacing the text in the angular brackets with the appropriate values:
    [Service]
    Environment="HTTP_PROXY=<proxy URL>:<port number of the proxy server>/""NO_PROXY=localhost,127.0.0.1,<IP address of the Docker Registry node>,<host name of the Docker Registry node>"
  6. Save the file and close it.
    Note: To save and close the file, enter ctrl+o and ctrl+x, respectively.
  7. Create a file named daemon.json in the following folder: /etc/docker
  8. Add the following lines of code in the daemon.json file:
    {
    "insecure-registries" : ["<IP address of the Docker Registry node>:5000","<host name of the Docker Registry node>:5000"]
    }                
  9. Run the following commands to verify that the proxy details that you have entered are correct:
    sudo systemctl daemon-reload
                        sudo systemctl restart docker
                        systemctl show --property=Environment docker                
  10. Using terminal, navigate to the pa-dtr folder.
  11. Access the .env file, and update the following parameters with the correct absolute path.
    • REGISTRY_WEB_CONFIG_VOLUME_PATH=/<absolute path>/pa-dtr/conf/registry-web
    • REGISTRY_WEB_DB_VOLUME_PATH=/<absolute path>/pa-dtr/conf/registry-web/db
    • REGISTRY_CONFIG_VOLUME_PATH=/<absolute path>/pa-dtr /pa-dtr/conf/registry
    • REGISTRY_DATA_VOLUME_PATH=/<absolute path>/pa-dtr/data
  12. In the pa-dtr folder, change the permission of the PA_DTR_Start_Lix.sh file to 775 by running the following command: sudo chmod 775 ./PA_DTR_Start_Lix.sh
  13. Access the PA_DTR_Start_Lix.sh file, and run the Shell script with sudo privileges: sudo ./PA_DTR_Start_Lix.sh. This is necessary to create and access the Docker registry.
  14. Go to the following locations to check if the Docker registry is created successfully:
    • Registry-url: http://<host name or IP address>:5000/v2/_catalog to verify that the registry is up and running.
    • Registry-web-url: http://<host name or IP address>:8080 to verify the docker images.
    Docker Registry is created. When prompted for the DTR URL during the installation of Plant Applications Web Client, enter <host name of IP address of this local Docker Registry>:5000.
    Note: Do not enter http or https.