diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..9c793f5 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,31 @@ +version: 2.1 +jobs: + build-arm-image: + machine: + image: ubuntu-2204:current + # docker_layer_caching: true + resource_class: arm.large + steps: + - checkout + # - setup_remote_docker + # - restore_cache: + # keys: + # - v1-{{ .Branch }} + # paths: + # - /caches/app.tar + - run: + name: Docker Login + command: | + echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin + - run: + name: Execute Build Script + command: | + cd security_docker_arm + bash local-builder-script.sh + # - run: + # name: Push Image + # command: | + # TAG=0.1.$CIRCLE_BUILD_NUM + # docker build -t $DOCKERHUB_USERNAME/circleci-docker-example:$TAG . + + # docker push $DOCKERHUB_USERNAME/circleci-docker-example:$TAG diff --git a/.github/workflows/sec-build-arm.yml b/.github/paused-sec-build-arm.yml similarity index 100% rename from .github/workflows/sec-build-arm.yml rename to .github/paused-sec-build-arm.yml diff --git a/security_docker_arm/Dockerfile b/security_docker_arm/Dockerfile index dc4e6ee..1e2bd68 100644 --- a/security_docker_arm/Dockerfile +++ b/security_docker_arm/Dockerfile @@ -1,4 +1,4 @@ -FROM tanq16/intermediate_builder:arm as intermediate_builder +FROM intermediate_builder as intermediate_builder FROM ubuntu:jammy # ============================================================================================================ diff --git a/security_docker_arm/local-builder-script.sh b/security_docker_arm/local-builder-script.sh index 68dca5a..9b219a8 100644 --- a/security_docker_arm/local-builder-script.sh +++ b/security_docker_arm/local-builder-script.sh @@ -1,5 +1,4 @@ -DOCKER_BUILDKIT=1 docker buildx build -o type=docker --platform=linux/arm64 -f builder.Dockerfile -t tanq16/intermediate_builder:arm . -docker push tanq16/intermediate_builder:arm -docker system prune -f -DOCKER_BUILDKIT=1 docker buildx build -o type=docker --platform=linux/arm64 -t tanq16/sec_docker:main_apple . +DOCKER_BUILDKIT=1 docker build -f builder.Dockerfile -t intermediate_builder . +docker builder prune -f +DOCKER_BUILDKIT=1 docker build -t tanq16/sec_docker:main_apple . docker push tanq16/sec_docker:main_apple