Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM64 docker images #1553

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
2862a6d
Flavor changes
bdovaz Jun 23, 2022
7f0df4e
Main Dockerfile changes
bdovaz Jun 23, 2022
76885a3
Build flavors workflow
bdovaz Jun 23, 2022
b61b380
Merge branch 'megalinter:main' into feature/arm-docker-image
bdovaz Jun 23, 2022
dca5e3b
Restore flavor Dockerfiles
bdovaz Jun 24, 2022
0d306e2
Change dotnet version to LTS
bdovaz Jun 24, 2022
c70b003
Add install_arm field to bash descriptor
bdovaz Jun 24, 2022
454eab3
Add arm_compliant field to env descriptor
bdovaz Jun 24, 2022
6a334e2
Empty Dockerfile_arm
bdovaz Jun 24, 2022
4b7e36b
build.py WIP
bdovaz Jun 24, 2022
1de041d
Add linter supported_architectures with CPU architecture-specific ins…
echoix Jul 4, 2022
43687be
Apply formatting of json schema
echoix Jul 4, 2022
99cab60
Use proper Docker architectures names
echoix Jul 4, 2022
c34f125
Change to supported_platforms to match the built-in build variable TA…
echoix Jul 4, 2022
ae32a12
Add riscv into cspell ignored words
echoix Jul 4, 2022
01e3c46
Add supported_platforms to bash descriptor
echoix Jul 4, 2022
9e6ae93
Merge pull request #1 from echoix/multi-arch-schema
bdovaz Jul 4, 2022
d10a600
Remove changes
bdovaz Jul 10, 2022
cd3636d
WIP
bdovaz Jul 10, 2022
8b07a11
WIP
bdovaz Jul 10, 2022
7536d1d
WIP
bdovaz Jul 10, 2022
bb60276
Merge branch 'pr/1553' into multi-arch-descriptors
echoix Jul 10, 2022
e32afa0
Update megalinter-descriptor.jsonschema for supported platforms at th…
echoix Jul 10, 2022
b3d3afb
Update examples to remove parent property from being included
echoix Jul 10, 2022
7306f49
Merge pull request #3 from echoix/multi-arch-schema-at-descriptor-level
bdovaz Jul 11, 2022
b39b6a3
Merge pull request #2 from echoix/multi-arch-descriptors
bdovaz Jul 11, 2022
162971a
Revert undesired change
bdovaz Jul 11, 2022
40e9846
First iteration on multi-platform support in descriptors
bdovaz Jul 12, 2022
f2896be
Merge branch 'main' into multi-arch-update-from-upstream
echoix Jul 17, 2022
a16c42e
Build schema html docs
echoix Jul 17, 2022
5e322ef
Merge pull request #4 from echoix/multi-arch-update-from-upstream
bdovaz Jul 22, 2022
a7e0d9a
Merge branch 'oxsecurity:main' into feature/arm-docker-image
bdovaz Jul 24, 2022
b6a0f39
Merge branch 'oxsecurity:main' into feature/arm-docker-image
bdovaz Aug 3, 2022
f7fbe17
Merge branch 'main' into multi-arch-update-from-upstream
echoix Sep 3, 2022
ee00aa0
Removed Dockerfilelint as removed in MegaLinter v6
echoix Sep 3, 2022
77d5a95
Add cspell exclusions for TARGETPLATFORM, aarch64, and armv6
echoix Sep 3, 2022
794ddee
Merge pull request #5 from echoix/multi-arch-update-from-upstream
bdovaz Sep 3, 2022
551ced9
Merge branch 'main' into feature/arm-docker-image
bdovaz Dec 29, 2022
d1ed860
Update docs
bdovaz Dec 29, 2022
9cd970f
Update Dockerfile
bdovaz Dec 29, 2022
c37ad90
Fix typo
bdovaz Dec 29, 2022
e855c8d
Update jsonschema
bdovaz Dec 29, 2022
07dbb0a
Add TARGETPLATFORM arg to shellcheck
bdovaz Dec 29, 2022
b85d52d
Merge branch 'main' into feature/arm-docker-image
bdovaz Jan 4, 2023
dbaaea8
Add conditions to kubeval and misspell
bdovaz Jan 5, 2023
56e5d6d
Merge branch 'main' into feature/arm-docker-image
bdovaz Jan 6, 2023
ca1177e
Run bash build.sh
bdovaz Jan 6, 2023
a58396f
Merge branch 'oxsecurity:main' into feature/arm-docker-image
bdovaz Jan 7, 2023
8624cc5
Merge branch 'oxsecurity:main' into feature/arm-docker-image
bdovaz Jan 7, 2023
3bdd29b
Merge branch 'oxsecurity:main' into feature/arm-docker-image
bdovaz Jan 8, 2023
2259d46
Merge branch 'main' into feature/arm-docker-image
bdovaz Jan 11, 2023
e51d292
Powershell cross platform support
bdovaz Jan 11, 2023
51160b3
Add linux/arm64 platform to docker build
bdovaz Jan 11, 2023
ea67c77
Merge branch 'main' into feature/arm-docker-image
bdovaz Jan 16, 2023
29e2ac1
Fix docker buildx in workflows
bdovaz Jan 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .automation/build_schemas_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
# Generate HTML documentation from JSON schemas, using json-schema-for-humans :)

generate-schema-doc ../megalinter/descriptors/schemas/megalinter-descriptor.jsonschema.json \
../docs/json-schemas/descriptor.html
../docs/json-schemas/descriptor.html \
--config minify=false \
--config expand_buttons=false \
--config link_to_reused_ref=false

generate-schema-doc ../megalinter/descriptors/schemas/megalinter-configuration.jsonschema.json \
../docs/json-schemas/configuration.html
../docs/json-schemas/configuration.html \
--config minify=false \
--config expand_buttons=false \
--config link_to_reused_ref=false
4 changes: 4 additions & 0 deletions .github/linters/.cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@
"Syft",
"Symlinks",
"Syntastic",
"TARGETPLATFORM",
"TEAMPROJECT",
"TEKTON",
"TERMIOS",
Expand Down Expand Up @@ -363,6 +364,7 @@
"Ywarn",
"Zepu",
"Zraku",
"aarch64",
"abefhkmnptuvx",
"abhith",
"absolutized",
Expand Down Expand Up @@ -392,6 +394,7 @@
"arctan",
"aren",
"argparse",
"armv6",
"arror",
"artefacts",
"asdict",
Expand Down Expand Up @@ -1095,6 +1098,7 @@
"returnrules",
"rexec",
"risd",
"riscv",
"rmfamily",
"rockspec",
"rockspecs",
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/auto-update-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,14 @@ jobs:
run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> ${GITHUB_ENV}

###################################
# Build image locally for testing #
# Build images locally for testing #
###################################
- name: Build image
- name: Build images
shell: bash
run: docker buildx build --platform linux/amd64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=auto_update_${GITHUB_SHA}" --build-arg "BUILD_VERSION=auto_update_${GITHUB_SHA}" --no-cache -t oxsecurity/megalinter:auto_update_${GITHUB_SHA} --load . | while read line ; do echo "$(date +'%H:%M:%S')| $line"; done;
run: |
docker buildx build --platform linux/amd64,linux/arm64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=auto_update_${GITHUB_SHA}" --build-arg "BUILD_VERSION=auto_update_${GITHUB_SHA}" --no-cache -t oxsecurity/megalinter:auto_update_${GITHUB_SHA} .
docker buildx build --load --platform linux/amd64 -t oxsecurity/megalinter:auto_update_${GITHUB_SHA} .
docker buildx build --load --platform linux/arm64 -t oxsecurity/megalinter:auto_update_${GITHUB_SHA}:arm64 .
timeout-minutes: 60

#####################################
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-ALPHA-flavors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-${{ matrix.flavor }}
IMAGE_VERSION: alpha
DOCKERFILE_PATH: flavors/${{ matrix.flavor }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
SQUASH: "true"
shell: bash
Expand All @@ -106,7 +106,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-${{ matrix.flavor }}
IMAGE_VERSION: alpha
DOCKERFILE_PATH: flavors/${{ matrix.flavor }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
SQUASH: "true"
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-ALPHA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: alpha
DOCKERFILE_PATH: Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand All @@ -86,7 +86,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: alpha
DOCKERFILE_PATH: Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
shell: bash
run: .automation/upload-docker.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-BETA-flavors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-${{ matrix.flavor }}
IMAGE_VERSION: beta
DOCKERFILE_PATH: flavors/${{ matrix.flavor }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand All @@ -109,7 +109,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-${{ matrix.flavor }}
IMAGE_VERSION: beta
DOCKERFILE_PATH: flavors/${{ matrix.flavor }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
shell: bash
run: .automation/upload-docker.sh
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-BETA-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }}
IMAGE_VERSION: beta
DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand All @@ -133,7 +133,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }}
IMAGE_VERSION: "${{ needs.prepare.outputs.unique_docker_image_name }}"
DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
ALWAYS_BUILD: force
shell: bash
Expand All @@ -150,7 +150,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }}
IMAGE_VERSION: beta
DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
shell: bash
run: .automation/upload-docker.sh
Expand All @@ -163,7 +163,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }}
IMAGE_VERSION: "${{ needs.prepare.outputs.unique_docker_image_name }}"
DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
ALWAYS_BUILD: force
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-BETA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: beta
DOCKERFILE_PATH: Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand All @@ -98,7 +98,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: beta
DOCKERFILE_PATH: Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
shell: bash
run: .automation/upload-docker.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-DEV-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }}
IMAGE_VERSION: ${{ needs.prepare.outputs.tag }}
DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/deploy-DEV.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ jobs:
echo "tag=${TAG}" >>"$GITHUB_OUTPUT"

###################################
# Build image locally for testing #
# Build images locally for testing #
###################################
- name: Build image (quick)
- name: Build images (quick)
if: "contains(github.event.head_commit.message, 'quick build')"
id: docker_build_quick
shell: bash
Expand All @@ -94,7 +94,9 @@ jobs:
MEGA_LINTER_BASE_IMAGE="oxsecurity/megalinter:${{steps.image_tag.outputs.tag}}"
echo "Reusing previously built image as base for quick build: ${MEGA_LINTER_BASE_IMAGE}"
fi
docker buildx build --platform linux/amd64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=${GITHUB_SHA}" --build-arg "BUILD_VERSION=${GITHUB_SHA}" --build-arg "MEGALINTER_BASE_IMAGE=${MEGA_LINTER_BASE_IMAGE}" --no-cache -f "Dockerfile-quick" -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} --load . | while read line ; do echo "$(date +'%H:%M:%S')| $line"; done;
docker buildx build --platform linux/amd64,linux/arm64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=${GITHUB_SHA}" --build-arg "BUILD_VERSION=${GITHUB_SHA}" --build-arg "MEGALINTER_BASE_IMAGE=${MEGA_LINTER_BASE_IMAGE}" --no-cache -f "Dockerfile-quick" -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} .
docker buildx build --load --platform linux/amd64 -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} .
docker buildx build --load --platform linux/arm64 -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}}:arm64 .
timeout-minutes: 60

##########################
Expand All @@ -109,15 +111,15 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: ${{steps.image_tag.outputs.tag}}
DOCKERFILE_PATH: Dockerfile-quick
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh || true

#######################################
# Build image (full for forked repos) #
# Build images (full for forked repos) #
#######################################
- name: Build image (full from forks)
- name: Build images (full from forks)
if: |
(
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) ||
Expand All @@ -127,7 +129,10 @@ jobs:
!contains(github.event.head_commit.message, 'quick build')
id: docker_build
shell: bash
run: docker buildx build --platform linux/amd64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=${GITHUB_SHA}" --build-arg "BUILD_VERSION=${GITHUB_SHA}" --no-cache -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} --load . | while read line ; do echo "$(date +'%H:%M:%S')| $line"; done;
run: |
docker buildx build --platform linux/amd64,linux/arm64 --build-arg "BUILD_DATE=${BUILD_DATE}" --build-arg "BUILD_REVISION=${GITHUB_SHA}" --build-arg "BUILD_VERSION=${GITHUB_SHA}" --no-cache -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} .
docker buildx build --load --platform linux/amd64 -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}} .
docker buildx build --load --platform linux/arm64 -t oxsecurity/megalinter:${{steps.image_tag.outputs.tag}}:arm64 .
timeout-minutes: 90

####################################
Expand All @@ -148,7 +153,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: ${{steps.image_tag.outputs.tag}}
DOCKERFILE_PATH: Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-RELEASE-flavors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-${{ matrix.flavor }}
IMAGE_VERSION: ${{ github.event.release.tag_name }}
DOCKERFILE_PATH: flavors/${{ matrix.flavor }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand All @@ -98,7 +98,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-${{ matrix.flavor }}
IMAGE_VERSION: ${{ github.event.release.tag_name }}
DOCKERFILE_PATH: flavors/${{ matrix.flavor }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
shell: bash
run: .automation/upload-docker.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-RELEASE-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }}
IMAGE_VERSION: "${{ github.event.release.tag_name }}"
DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
ALWAYS_BUILD: force
shell: bash
Expand All @@ -113,7 +113,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter-only-${{ matrix.linter }}
IMAGE_VERSION: "${{ github.event.release.tag_name }}"
DOCKERFILE_PATH: linters/${{ matrix.linter }}/Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
ALWAYS_BUILD: force
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-RELEASE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: ${{ github.event.release.tag_name }}
DOCKERFILE_PATH: Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: Docker
shell: bash
run: .automation/upload-docker.sh
Expand All @@ -88,7 +88,7 @@ jobs:
IMAGE_REPO: oxsecurity/megalinter
IMAGE_VERSION: ${{ github.event.release.tag_name }}
DOCKERFILE_PATH: Dockerfile
DOCKER_BUILD_PLATFORMS: linux/amd64
DOCKER_BUILD_PLATFORMS: linux/amd64,linux/arm64
REGISTRY: GCR
shell: bash
run: .automation/upload-docker.sh
Expand Down
Loading