Create and Configure Docker Registry
About this task
Procedure
-
From the Plant Applications Enterprise Edition Web Client installation package, download the DTR2023 folder to the
machine on which you want to run Docker Registry.
Note:It is not mandatory to have local registry DTR2023. However, due to security concerns, we recommend to have a new local registry (DTR2023).Note:Ensure that you have enough space (minimum 50 GB) to store these extracted files.
-
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
-
In the docker.service.d folder that you have created,
create a file named http\u0002proxy.conf by running the
following command:
sudo nano /etc/systemd/system/docker.service.d/http-proxy.conf
-
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/"NO_PROXY=localhost,127.0.0.1,<docker registry IP address>,<docker registry hostname>"
-
Save the file and close it.
Note:To save and close the file, enter Ctrl+O and Ctrl+X, respectively.
- Create a file named daemon.json in the following folder: /etc/docker
- 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"] }
-
Run the following commands to restart the docker:
sudo systemctl restart docker
- Using terminal, change directory (cd) to the DTR2023 folder.
-
In the DTR2023 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
. -
Execute the PA_DTR_Start_Lix.sh Shell script with sudo privileges:
sudo ./PA_DTR_Start_Lix.sh
. The output of the command looks similar to the following:
-
Add the following to the Registry-url bullet:
http:// <dockerregistry IP>/<docker registry hostname> :5000/v2/
You should see the following text returned by the web server:
{}