Replies: 1 comment
-
Using a shell is the most appropriate way to execute multiple commands in a container, versus implicitly coupling multiple separate |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
We are using the docker image
ghcr.io/terraform-linters/tflint-bundle
currently in our pipelines to check our code. This is deprecated and we should use the plugin management instead. The docker command provided automatically removes the image (and even without it) runningdocker run --rm -v $(pwd):/data -t ghcr.io/terraform-linters/tflint --init && docker run --rm -v $(pwd):/data -t ghcr.io/terraform-linters/tflint --recursive
fails withProposal
I think we should state a recommended way to work with docker and plugins. My current idea is to force the plugins directory into the pwd by either creating the folder or setting it in config
Another way would be to allow running init and scan in the same command. This can be archived by overwriting the entry point and running tflint via sh
docker run --rm -v "$(pwd):/data" --entrypoint=/bin/sh ghcr.io/terraform-linters/tflint -c "tflint --init && tflint --recursive"
I'm not sure, what is better/should be the recommended way.
References
Beta Was this translation helpful? Give feedback.
All reactions