Add microscanner back for scan image

This commit is contained in:
Sambo Chea 2021-03-26 11:24:55 +07:00
parent c911f56038
commit 50708b14d7

View File

@ -20,8 +20,8 @@ PRE_INSTALL="./src/pre-install.sh"
POST_INSTALL="./src/post-install.sh"
mkdir -p $DOCKER_ROOT
# MS_ROOT="${DOCKER_ROOT}/microscanner"
# mkdir -p $MS_ROOT
MS_ROOT="${DOCKER_ROOT}/microscanner"
mkdir -p $MS_ROOT
# Load pre-install
$PRE_INSTALL
@ -55,10 +55,10 @@ cd -
docker build --build-arg BASE_IMAGE="${DOCKER_USERNAME}/${DOCKER_IMAGE_NAME}:${ALPINE_VERSION}" --build-arg MS_TOKEN="${MS_TOKEN}" - <<'DOCKERFILE'
ARG BASE_IMAGE
FROM $BASE_IMAGE
# ARG MS_TOKEN
# RUN wget https://get.aquasec.com/microscanner -O /home/cubetiq/microscanner \
# && echo "8e01415d364a4173c9917832c2e64485d93ac712a18611ed5099b75b6f44e3a5 /home/cubetiq/microscanner" | sha256sum -c - \
# && chmod +x /home/cubetiq/microscanner \
# && /home/cubetiq/microscanner $MS_TOKEN \
# && rm -r /home/cubetiq/microscanner
ARG MS_TOKEN
RUN wget https://get.aquasec.com/microscanner -O /home/cubetiq/microscanner \
&& echo "8e01415d364a4173c9917832c2e64485d93ac712a18611ed5099b75b6f44e3a5 /home/cubetiq/microscanner" | sha256sum -c - \
&& chmod +x /home/cubetiq/microscanner \
&& /home/cubetiq/microscanner $MS_TOKEN \
&& rm -r /home/cubetiq/microscanner
DOCKERFILE