Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
This article provides a guide on installing Qlik Replicate on a docker image.
sudo rpm -qa|grep dockersudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-laster-logrotate docker-logrotate docker-engine
sudo yum install -y yum-utils device-mapper-persistent-data lvm2 sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo sudo yum install --allowerasing docker-ce docker-ce-cli containerd.io sudo systemctl start docker sudo systemctl enable docker
/kit" The /kit directory is a temporary folder used to store installation files. In the example below, the RPM file is areplicate-2024.5.0-357.x86_64.rpm. Once the installation is complete, the entire /kit folder can be safely deleted.mkdir -p /kit/ar_docker
cd /kit
rpm2cpio areplicate-2024.5.0-357.x86_64.rpm | cpio -iv --make-directories --no-absolute-filenames -D ar_docker/ ./opt/attunity/replicate/addons/samples/docker/*
mv ./ar_docker/opt/attunity/replicate/addons/samples/docker/* ./ar_docker
rm -rf ./ar_docker/opt
cd /kit/ar_docker
cp ../areplicate-2024.5.0-357.x86_64.rpm .
./create-dockerfile.sh
/kit/ar_docker/Dockerfile , from:
RUN yum -y install /tmp/areplicate-*.rpmto
RUN systemd=no yum -y install /tmp/areplicate-*.rpm
NOTE!
The parameter systemd=no is used to solve the below error you may hit during the docker build stage: This rpm is not supported on your system (no systemctl), exiting. error: %prein(areplicate-2024.5.0-357.x86_64) scriptlet failed, exit status 43
NOTE!
The password should not be empty and must be strong enough.
WARNING!
If you want to install ODBC Drivers, please make the corresponding ODBC Drivers rpm files are ready in this folder. If you want to skip the ODBC Drivers installation at present, rename or delete the file "drivers" in this folder.
docker build --no-cache -t johnw/replicate:2024.5 .where
/johnw/replicate:2024.5 is the image tag.Do not forget the last period "."
docker run -d --name ar --hostname cdc2 -e ReplicateRestPort=3552 -p 3552:3552 -v /dockermount/data/replicate/data:/replicate/data johnw/replicate:2024.5
Now Qlik Replicate is running in the docker and can be accessed from Qlik Replicate Console GUI.
Hi John, the systemd=no parameter/variable being passed to yum appears to make no difference for us:
[av63916:~/kit]$ rpm2cpio /Users/av63916/gds-lfs/qlik/areplicate-2024.5.0-144.x86_64.rpm | cpio -iv --make-directories --no-absolute-filenames -D ar_docker/ ./opt/attunity/replicate/addons/samples/docker/*
cpio: Option --no-absolute-filenames is not supported
Brief Usage:
List: cpio -it < archive
Extract: cpio -i < archive
Create: cpio -o < filenames > archive
Help: cpio --help
tar: Write error
Hello @Vegy ,
Please take note the resolution applies to
If you are installing 2024.5 previous builds, or previous major versions eg 2023.11 then please follow the workaround in step 5 and 6 as below:
5. Prepare the docker build files
cd /kit/ar_docker
cp ../areplicate-2023.11.0-547.x86_64.rpm .
# create a script file "systemctl"
echo "ls" > systemctl
chmod u+x systemctl
./create-dockerfile.sh
6. add below lines to the end of section "#install prequisits" of file /kit/ar_docker/Dockerfile, like:
# Install dummy systemd
ADD systemctl /usr/sbin
Regards,
John.
Hi John, after recently receiving the link to the latest 2024.5 package passing the systemd=no parameter to the yum install still does not appear to work:
Hi @Vegy ,
Please take note there are 2 resolution in this article:
1- "RUN systemd=no yum"
This solution works with Replicate 2024.5 SP03 and above builds.
You are trying to install 2024.5 SP02 (2024.5.0-316) hence hit error.
2- "# Install dummy systemd"
You may wait for 2024.5 SP03 formal release, or if you still want to run 2024.5 SP02, please take the workaround "# Install dummy systemd". I've added the WA for you specially in my previous comment.
Regards,
John.
Hi @john_wang,
Hope you can help me out containerise 2023.11. (Disclaimer - I am still learning docker)
I can't use centos as I can't get the packages behind the firewall so using Redhat 9
FROM my.company.docker.repo/redhat/ubi9
#install prequisits
# RUN pushd /etc/yum.repos.d/
# RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
# RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
ADD postgresql*.rpm /tmp/
ADD areplicate-*.rpm /tmp/
ADD systemctl /usr/sbin
ADD replicate_license_xxxx.txt /tmp/
RUN yum -y install unixODBC unzip
RUN yum -y install libicu.x86_64
RUN rm -f /etc/odbcinst.ini
RUN rpm -ivh /tmp/postgresql13-libs-13.9-1PGDG.rhel9.x86_64.rpm
RUN rpm -ivh /tmp/postgresql13-odbc-13.02.0000-2PGDG.rhel9.x86_64.rpm
RUN rpm -ivh /tmp/postgresql13-13.9-1PGDG.rhel9.x86_64.rpm
ADD odbcinst.ini /etc/
RUN systemd=no yum -y install /tmp/areplicate-2023.11.0-468.x86_64.rpm
RUN yum clean all
RUN rm -f /tmp/areplicate-*.rpm
RUN echo "export LD_LIBRARY_PATH=/usr/pgsql-13/lib:$LD_LIBRARY_PATH" >> /opt/attunity/replicate/bin/site_arep_login.sh
ENV ReplicateDataFolder=/replicate/data
ENV ReplicateAdminPassword=password
ENV ReplicateRestPort=3552
ENV LicenseFile=/tmp/replicate_license_xxxx.txt
ADD start_replicate.sh /opt/attunity/replicate/bin/start_replicate.sh
RUN chmod 775 /opt/attunity/replicate/bin/start_replicate.sh
RUN chown attunity:attunity /opt/attunity/replicate/bin/start_replicate.sh
ENTRYPOINT /opt/attunity/replicate/bin/start_replicate.sh ${ReplicateDataFolder} ${ReplicateAdminPassword} ${ReplicateRestPort} ${LicenseFile} ; tail -f /dev/null
The container builds and I can start the container; but I can't get to port 3552 on my local browser.
The docker logs contains no output.
If I go into the container and try manually starting start_replicate.sh; I get the following error message:
[attunity@cdc2 /]$ /opt/attunity/replicate/bin/repctl.sh -d /replicate/data service start rest_port=3552
/opt/attunity/replicate/bin/repctl: error while loading shared libraries: libarepbase.so: cannot open shared object file: No such file or directory
I found a post with the similar error message (https://community.qlik.com/t5/Official-Support-Articles/How-to-Decrypt-Qlik-Replicate-Verbose-Task-L...) but it didn't have a clear solution to the problem.
I think the fix is to source site_arep_login.sh.
In our Dockerfile we have this entry: source $QLIK_REPLICATE_BASE_DIR/bin/arep_login.sh" >>~attunity/.bash_profile
Apologies, we also set that variable in the Dockerfile as it appears a lot:
ENV QLIK_REPLICATE_BASE_DIR=/opt/attunity/replicate/
Thanks - I will give it a try
I got it working with the following code:
Disclaimer - I am no expert so please don't deploy this straight into a high critical prod environment 😬
FROM my.company.docker.repo/redhat/ubi9
ADD postgresql*.rpm /tmp/
ADD areplicate-*.rpm /tmp/
ADD systemctl /usr/sbin
ADD replicate_license_exp2025-06-29_ser60038556.txt /tmp/
RUN dnf -y update
RUN dnf makecache
RUN dnf -y install procps-ng
RUN dnf -y install unixODBC unzip
RUN dnf -y install libicu.x86_64
RUN rm -f /etc/odbcinst.ini
RUN rpm -ivh /tmp/postgresql13-libs-13.9-1PGDG.rhel9.x86_64.rpm
RUN rpm -ivh /tmp/postgresql13-odbc-13.02.0000-2PGDG.rhel9.x86_64.rpm
RUN rpm -ivh /tmp/postgresql13-13.9-1PGDG.rhel9.x86_64.rpm
ADD odbcinst.ini /etc/
RUN systemd=no yum -y install /tmp/areplicate-2023.11.0-468.x86_64.rpm
RUN yum clean all
RUN rm -f /tmp/areplicate-*.rpm
RUN export LD_LIBRARY_PATH=/opt/attunity/replicate/lib:\$LD_LIBRARY_PATH
RUN echo "export LD_LIBRARY_PATH=/usr/pgsql-13/lib:\$LD_LIBRARY_PATH" >> /opt/attunity/replicate/bin/site_arep_login.sh
# RUN
ENV QLIK_REPLICATE_BASE_DIR=/opt/attunity/replicate/
ENV ReplicateDataFolder=/replicate/data
ENV ReplicateAdminPassword=AB1gL0ngPa33w0rd
ENV ReplicateRestPort=3552
ENV LicenseFile=/tmp/replicate_license_exp2025-06-29_ser60038556.txt
ADD start_replicate.sh /opt/attunity/replicate/bin/start_replicate.sh
RUN chmod 775 /opt/attunity/replicate/bin/start_replicate.sh
RUN chown attunity:attunity /opt/attunity/replicate/bin/start_replicate.sh
RUN source $QLIK_REPLICATE_BASE_DIR/bin/arep_login.sh >>~attunity/.bash_profile
ENTRYPOINT /opt/attunity/replicate/bin/start_replicate.sh ${ReplicateDataFolder} ${ReplicateAdminPassword} ${ReplicateRestPort} ${LicenseFile} ; tail -f /dev/null