diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/src/build.sh b/src/build.sh new file mode 100644 index 0000000..585eb69 --- /dev/null +++ b/src/build.sh @@ -0,0 +1,55 @@ +#!/bin/sh +# +# Copyright (c) 2021 Sambo Chea "${DOCKER_ROOT}/Dockerfile" +FROM scratch +USER worker +ADD $(basename $BUILD_TAR) / +CMD ["/bin/sh"] +DOCKERFILE + +cd $DOCKER_ROOT +docker build --no-cache -t "${DOCKER_USERNAME}/alpine:${ALPINE_VERSION}" . +cd - + +docker build --build-arg BASE_IMAGE="${DOCKER_USERNAME}/alpine:${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/worker/microscanner \ + && echo "8e01415d364a4173c9917832c2e64485d93ac712a18611ed5099b75b6f44e3a5 /home/worker/microscanner" | sha256sum -c - \ + && chmod +x /home/worker/microscanner \ + && /home/worker/microscanner $MS_TOKEN +DOCKERFILE \ No newline at end of file diff --git a/src/post-install.sh b/src/post-install.sh new file mode 100644 index 0000000..3d2a0ad --- /dev/null +++ b/src/post-install.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Copyright (c) 2021 Sambo Chea