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
13
13
IMAGE_NAME=" zenika/terraform-aws-cli"
14
14
[[ -n $3 ]] && IMAGE_TAG=$3 || IMAGE_TAG=" dev"
15
15
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) "
18
18
19
19
# Lint Dockerfile
20
20
echo " 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
22
22
echo " Lint Successful!"
23
23
24
24
# Build image
@@ -32,7 +32,7 @@ export AWS_VERSION=${AWS_VERSION} && export TF_VERSION=${TF_VERSION}
32
32
envsubst ' ${AWS_VERSION},${TF_VERSION}' < tests/container-structure-tests.yml.template > tests/container-structure-tests.yml
33
33
echo " Test config successfully generated!"
34
34
echo " 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
36
36
37
37
# cleanup
38
38
unset AWS_VERSION
You can’t perform that action at this time.
0 commit comments