FROM alpine:3

RUN apk --no-cache add curl

WORKDIR /image-scanner/

COPY install_trivy.sh install_trivy.sh
RUN chmod +x /image-scanner/install_trivy.sh && \
    sh /image-scanner/install_trivy.sh

COPY scan_image.sh scan_image.sh
RUN chmod +x /image-scanner/scan_image.sh

ENV TRIVY_AUTH_URL= \
    TRIVY_USERNAME= \
    TRIVY_PASSWORD=

CMD sh /image-scanner/scan_image.sh