Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
ea0b79582f
|
|||
|
ecfc5dab1b
|
|||
|
|
53a1e8db0d | ||
|
|
164849699d | ||
|
419d03fa43
|
|||
|
83355f79ed
|
|||
|
454b1150a0
|
|||
|
774df4d22b
|
|||
|
|
9b5801f670 | ||
|
|
b41508fbf8 | ||
|
|
0327dd1e09 | ||
|
290b2765d3
|
|||
|
dc9f5d46b3
|
8
.github/workflows/docker.yml
vendored
8
.github/workflows/docker.yml
vendored
@@ -4,7 +4,7 @@ name: CI
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'main'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
@@ -12,16 +12,16 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v2
|
||||||
-
|
-
|
||||||
name: Login to DockerHub
|
name: Login to DockerHub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_HUB_SECRET }}
|
password: ${{ secrets.DOCKER_HUB_SECRET }}
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
-
|
-
|
||||||
name: Build and Push from Makefile
|
name: Build and Push from Makefile
|
||||||
|
|||||||
9
Makefile
9
Makefile
@@ -1,8 +1,13 @@
|
|||||||
DOCKER_IMAGE = cubetiq/calpine-os-linux:3.13
|
DOCKER_IMAGE_NAME = cubetiq/calpine-os-linux
|
||||||
DOCKER_IMAGE_SIZE = $(shell docker images --format "{{.Repository}} {{.Size}}" | grep $(DOCKER_IMAGE) | cut -d\ -f2)
|
DOCKER_IMAGE_SIZE = $(shell docker images --format "{{.Repository}} {{.Size}}" | grep $(DOCKER_IMAGE_NAME) | cut -d\ -f2)
|
||||||
|
DOCKER_IMAGE=${DOCKER_IMAGE_NAME}:3.18.3
|
||||||
|
|
||||||
build:
|
build:
|
||||||
./src/build.sh
|
./src/build.sh
|
||||||
@echo "Size of the image: ${DOCKER_IMAGE_SIZE}"
|
@echo "Size of the image: ${DOCKER_IMAGE_SIZE}"
|
||||||
|
|
||||||
|
docker tag ${DOCKER_IMAGE} ${DOCKER_IMAGE_NAME}:latest
|
||||||
docker push ${DOCKER_IMAGE}
|
docker push ${DOCKER_IMAGE}
|
||||||
|
docker push ${DOCKER_IMAGE_NAME}
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# CUBETIQ Alpine OS Linux 3.13
|
# CUBETIQ Alpine OS Linux
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ make build
|
|||||||
# [Docker Hub](https://hub.docker.com/r/cubetiq/calpine-os-linux)
|
# [Docker Hub](https://hub.docker.com/r/cubetiq/calpine-os-linux)
|
||||||
### Pull image
|
### Pull image
|
||||||
```shell
|
```shell
|
||||||
docker pull cubetiq/calpine-os-linux:3.13
|
docker pull cubetiq/calpine-os-linux:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
### Running container
|
### Running container
|
||||||
|
|||||||
6
renovate.json
Normal file
6
renovate.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"config:base"
|
||||||
|
]
|
||||||
|
}
|
||||||
16
src/build.sh
16
src/build.sh
@@ -10,7 +10,8 @@ set -ex
|
|||||||
# Default args
|
# Default args
|
||||||
DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME:-calpine-os-linux}
|
DOCKER_IMAGE_NAME=${DOCKER_IMAGE_NAME:-calpine-os-linux}
|
||||||
DOCKER_USERNAME="${DOCKER_USERNAME:-cubetiq}"
|
DOCKER_USERNAME="${DOCKER_USERNAME:-cubetiq}"
|
||||||
ALPINE_VERSION="${ALPINE_VERSION:-3.13}"
|
ALPINE_VERSION="${ALPINE_VERSION:-3.18.3}"
|
||||||
|
ALPINE_MAKE_ROOTFS_VERSION="${ALPINE_MAKE_ROOTFS_VERSION:-0.7.0}"
|
||||||
PACKAGES="apk-tools ca-certificates ssl_client"
|
PACKAGES="apk-tools ca-certificates ssl_client"
|
||||||
|
|
||||||
MKROOTFS="/tmp/alpine-make-rootfs"
|
MKROOTFS="/tmp/alpine-make-rootfs"
|
||||||
@@ -20,16 +21,14 @@ PRE_INSTALL="./src/pre-install.sh"
|
|||||||
POST_INSTALL="./src/post-install.sh"
|
POST_INSTALL="./src/post-install.sh"
|
||||||
|
|
||||||
mkdir -p $DOCKER_ROOT
|
mkdir -p $DOCKER_ROOT
|
||||||
MS_ROOT="${DOCKER_ROOT}/microscanner"
|
|
||||||
mkdir -p $MS_ROOT
|
|
||||||
|
|
||||||
# Load pre-install
|
# Load pre-install
|
||||||
$PRE_INSTALL
|
$PRE_INSTALL
|
||||||
|
|
||||||
# Build from alpine rootfs
|
# Build from alpine rootfs
|
||||||
# Download rootfs builder and verify it.
|
# Download rootfs builder and verify it.
|
||||||
wget https://raw.githubusercontent.com/alpinelinux/alpine-make-rootfs/v0.5.1/alpine-make-rootfs -O "$MKROOTFS"
|
wget https://raw.githubusercontent.com/alpinelinux/alpine-make-rootfs/v${ALPINE_MAKE_ROOTFS_VERSION}/alpine-make-rootfs -O "$MKROOTFS"
|
||||||
echo "a7159f17b01ad5a06419b83ea3ca9bbe7d3f8c03 $MKROOTFS" | sha1sum -c -
|
echo "e09b623054d06ea389f3a901fd85e64aa154ab3a $MKROOTFS" | sha1sum -c -
|
||||||
chmod +x ${MKROOTFS}
|
chmod +x ${MKROOTFS}
|
||||||
|
|
||||||
sudo ${MKROOTFS} --mirror-uri http://dl-2.alpinelinux.org/alpine \
|
sudo ${MKROOTFS} --mirror-uri http://dl-2.alpinelinux.org/alpine \
|
||||||
@@ -56,12 +55,5 @@ cd -
|
|||||||
docker build --build-arg BASE_IMAGE="${DOCKER_USERNAME}/${DOCKER_IMAGE_NAME}:${ALPINE_VERSION}" --build-arg MS_TOKEN="${MS_TOKEN}" - <<'DOCKERFILE'
|
docker build --build-arg BASE_IMAGE="${DOCKER_USERNAME}/${DOCKER_IMAGE_NAME}:${ALPINE_VERSION}" --build-arg MS_TOKEN="${MS_TOKEN}" - <<'DOCKERFILE'
|
||||||
ARG BASE_IMAGE
|
ARG BASE_IMAGE
|
||||||
FROM $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
|
DOCKERFILE
|
||||||
Reference in New Issue
Block a user