Install on Docker
There are a few variations on how to install the Ardexa agent inside a docker container (depending on your use case), but in this article we will be focusing on building a single use container that behaves just like a Linux Machine.
- Open the Ardexa Web UI, browse to the Devices tab and click
- Give the new device a name, select
Linux 64 bit (x86_64), and then click Create
- Download and unizp the
- Copy the
debfile into the same directory as the
- Note down the agent version listed in the
- Rename the
debfile to simply
Add the following content to your
ENV container docker
COPY ardexa.deb /
RUN apt-get update \
&& apt-get install -y procps unzip systemd lsb-base \
python3 python3-pip nmap arp-scan wget \
&& apt-get install -y --no-install-recommends at \
&& rm -f /sbin/init \
&& ln -sf ../lib/systemd/systemd /sbin/init \
&& dpkg -i /ardexa.deb
RUN systemctl enable ardexa
VOLUME ["/etc/ardexa", "/opt/ardexa/logs"]
Then build the image. We recommend giving the image the same name as Step 1 and tagging it with the agent version.
docker build -t ardexa_docker_agent:2.4.2 .
systemdto run successfully inside a container, it needs some special treatment. We also want the container to run in the background and keep running even if we reboot the machine. The following
dockercommand will launch the container with all the necessary privileges and flags.
docker run --restart unless-stopped -d --name ardexa_docker_agent --privileged \
--tmpfs /tmp --tmpfs /run --tmpfs /run/lock \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro ardexa_docker_agent:2.4.2
Now that your agent container is up and running, you can focus on data collection. Given that this is somewhat unique to every use case, we encourage you to reach out to your account manager for suggestions on how best to meet your needs.