Compare commits

..

No commits in common. "454b1150a0758805fee0ef3713949eb3026cd822" and "e7e75087ab793a0bad7c39d30bc1c88e579c6f22" have entirely different histories.

3 changed files with 17 additions and 9 deletions

View File

@ -4,7 +4,7 @@ name: CI
on:
push:
branches:
- 'main'
- 'master'
jobs:
docker:
@ -12,16 +12,16 @@ jobs:
steps:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_SECRET }}
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v2
-
name: Build and Push from Makefile

View File

@ -1,6 +1,6 @@
DOCKER_IMAGE_NAME = cubetiq/calpine-os-linux
DOCKER_IMAGE_SIZE = $(shell docker images --format "{{.Repository}} {{.Size}}" | grep $(DOCKER_IMAGE_NAME) | cut -d\ -f2)
DOCKER_IMAGE=${DOCKER_IMAGE_NAME}:3.16
DOCKER_IMAGE=${DOCKER_IMAGE_NAME}:3.13
build:
./src/build.sh

View File

@ -10,8 +10,7 @@ set -ex
# Default args
DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME:-calpine-os-linux}
DOCKER_USERNAME="${DOCKER_USERNAME:-cubetiq}"
ALPINE_VERSION="${ALPINE_VERSION:-3.16.2}"
ALPINE_MAKE_ROOTFS_VERSION="${ALPINE_MAKE_ROOTFS_VERSION:-0.6.1}"
ALPINE_VERSION="${ALPINE_VERSION:-3.13}"
PACKAGES="apk-tools ca-certificates ssl_client"
MKROOTFS="/tmp/alpine-make-rootfs"
@ -21,14 +20,16 @@ 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
# Load pre-install
$PRE_INSTALL
# Build from alpine rootfs
# Download rootfs builder and verify it.
wget https://raw.githubusercontent.com/alpinelinux/alpine-make-rootfs/v${ALPINE_MAKE_ROOTFS_VERSION}/alpine-make-rootfs -O "$MKROOTFS"
echo "c9cfea712709df162f4dcf26e2b1422aadabad43 $MKROOTFS" | sha1sum -c -
wget https://raw.githubusercontent.com/alpinelinux/alpine-make-rootfs/v0.5.1/alpine-make-rootfs -O "$MKROOTFS"
echo "a7159f17b01ad5a06419b83ea3ca9bbe7d3f8c03 $MKROOTFS" | sha1sum -c -
chmod +x ${MKROOTFS}
sudo ${MKROOTFS} --mirror-uri http://dl-2.alpinelinux.org/alpine \
@ -55,5 +56,12 @@ 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
DOCKERFILE