FROM quay.io/sysdig/sysdig-mini-ubi:1.4.6

ARG AGENT_VERSION

MAINTAINER Sysdig <support@sysdig.com>

ENV SYSDIG_REPOSITORY dev

USER root
HEALTHCHECK CMD /bin/true

COPY ./agentone-entrypoint.sh /

RUN microdnf update && \
	microdnf install findutils && \
	rpm --import https://download.sysdig.com/DRAIOS-GPG-KEY.public && \
	curl -s -o /etc/yum.repos.d/draios.repo http://download.sysdig.com/${SYSDIG_REPOSITORY}/rpm/draios.repo && \
	microdnf install draios-agentone-${AGENT_VERSION} && \
	(rpm -e --nodeps libksba; \
	 true) && \
	microdnf clean all

ENTRYPOINT ["/agentone-entrypoint.sh"]
