FROM debian:buster AS builder RUN apt-get update && \ apt-get -y install curl unzip RUN curl -o d42-agent-remote.zip \ $(curl -s https://www.device42.com/autodiscovery/ | grep d42-agent-remote | cut -d'"' -f4) RUN unzip d42-agent-remote.zip RUN chmod +x d42-agent-remote/d42_autodisc_linux_x64 FROM debian:buster COPY entrypoint.sh /entrypoint.sh COPY --from=builder d42-agent-remote/d42_autodisc_linux_x64 /usr/local/bin/d42_autodisc_linux_x64 WORKDIR /etc/device42 ENTRYPOINT ["/entrypoint.sh"]