File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ set -eo pipefail
1313IMAGE_NAME=" zenika/terraform-aws-cli"
1414[[ -n $3 ]] && IMAGE_TAG=$3 || IMAGE_TAG=" dev"
1515
16- # Set platform for Hadolint image
17- [[ " $( uname -m) " == " arm64 " ]] && PLATFORM= " linux/arm64 " || PLATFORM= " linux/amd64 "
16+ # Set platform for Hadolint image (only linux/arm64 or linux/arm64 supported)
17+ PLATEFORM= " linux/ $( uname -m) "
1818
1919# Lint Dockerfile
2020echo " Linting Dockerfile..."
21- docker run --rm --interactive --volume " ${PWD} " :/data --workdir /data --platform " ${PLATFORM } " hadolint/hadolint:2.12.0-alpine /bin/hadolint --config hadolint.yaml Dockerfile
21+ docker container run --rm --interactive --volume " ${PWD} " :/data --workdir /data --platform " ${PLATEFORM } " hadolint/hadolint:2.12.0-alpine /bin/hadolint --config hadolint.yaml Dockerfile
2222echo " Lint Successful!"
2323
2424# Build image
@@ -32,7 +32,7 @@ export AWS_VERSION=${AWS_VERSION} && export TF_VERSION=${TF_VERSION}
3232envsubst ' ${AWS_VERSION},${TF_VERSION}' < tests/container-structure-tests.yml.template > tests/container-structure-tests.yml
3333echo " Test config successfully generated!"
3434echo " Executing container structure test..."
35- docker container run --rm --interactive --volume " ${PWD} " /tests/container-structure-tests.yml:/tests.yml:ro -v /var/run/docker.sock:/var/run/docker.sock:ro gcr.io/gcp-runtimes/container-structure-test:v1.10 .0 test --image $IMAGE_NAME :$IMAGE_TAG --config /tests.yml
35+ docker container run --rm --interactive --volume " ${PWD} " /tests/container-structure-tests.yml:/tests.yml:ro -v /var/run/docker.sock:/var/run/docker.sock:ro gcr.io/gcp-runtimes/container-structure-test:v1.14 .0 test --image $IMAGE_NAME :$IMAGE_TAG --config /tests.yml
3636
3737# cleanup
3838unset AWS_VERSION
You can’t perform that action at this time.
0 commit comments