ARG BASE_IMAGE=argus-sys-metric-test-node:latest
FROM ${BASE_IMAGE}

ARG CLIENT_VER
LABEL org.opencontainers.image.title="argus-sys-metric-test-node-bundle" \
      org.opencontainers.image.version="${CLIENT_VER}" \
      org.opencontainers.image.description="Metric test node with embedded client package"

WORKDIR /

# bundle files are provided at build time into ./bundle in build context
COPY bundle/ /bundle/
COPY node-bootstrap.sh /usr/local/bin/node-bootstrap.sh
COPY health-watcher.sh /usr/local/bin/health-watcher.sh
RUN chmod +x /usr/local/bin/node-bootstrap.sh /usr/local/bin/health-watcher.sh

ENTRYPOINT ["/usr/local/bin/node-bootstrap.sh"]
