Search code examples
dockerfilearm64rtesafenethasp

How to install the Sentinel LDK Run-time Environment (RTE) within a Docker container


When I was compiling the Docker image, an error occurred, as shown below

[root@3e8a57de9554 ~]# rpm -ivh aksusbd-10.11-1.aarch64.rpm 
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
The installation of the RTE is only supported on Linux systems that use systemd. If you are attempting to install the RTE within a Docker container, be aware that systemd is typically not supported inside Docker, even if it is present on the host system. Refer to the RTE documentation for guidance on how to proceed with Docker.
error: %prein(aksusbd-10.11-1.aarch64) scriptlet failed, exit status 7
error: aksusbd-10.11-1.aarch64: install failed
[root@3e8a57de9554 ~]# 

Dockerfile

FROM dockerpull.com/library/rockylinux:9.3
USER root
ADD aksusbd-10.11.1/pkg/aksusbd-10.11-1.aarch64.rpm  ~/
RUN yum install systemd -y
RUN rpm -ivh ~/aksusbd-10.11-1.aarch64.rpm

aksusbd-10.11-1.aarch64.rpm is in Sentinel_LDK.tar.gz

I am not very familiar with Linux, I have searched a lot of information, but I did not find a similar problem , what should i do ?


Solution

  • The reason for this issue is that the aksusbd software needs to be started with the systemd daemon after installation,but Docker does not recommend starting the systemd process inside the container, and the official rockylinux image does not have the systemd image installed, My solution here is to manually create the "/run/systemd/system" directory before installing aksusbd. There will be warnings during the installation process but no errors. Then, when using the container, start aksusbd first and execute the required programs. My Dockerfile is as follows:

    FROM centos:7.9.2009
    
    RUN export DOCKER_RES_URL=http://172.16.31.68:17637 && \
     rm -rf /etc/yum.repos.d/*.repo && \ 
     curl -o /root/hasp.rpm                    $DOCKER_RES_URL/aksusbd-8.53-1.x86_64.rpm && \
     curl -o /etc/yum.repos.d/CentOS-Base.repo $DOCKER_RES_URL/Centos-7.repo && \
     curl -o /etc/yum.repos.d/epel.repo        $DOCKER_RES_URL/epel-7.repo && \
     mkdir -p /run/systemd/system && \
     rpm -Uvh /root/hasp.rpm && rm -rf /root/hasp.rpm && \ 
     yum clean all && rm -rf /var/cache/yum/*
    

    enter image description here