feat: add terraform-ci image with tflint
This commit is contained in:
33
images/terraform-ci/Dockerfile
Normal file
33
images/terraform-ci/Dockerfile
Normal file
@@ -0,0 +1,33 @@
|
||||
# =============================================================================
|
||||
# Terraform CI Image
|
||||
#
|
||||
# Image légère pour les pipelines CI/CD Terraform
|
||||
# Inclut : Terraform, tflint, git
|
||||
# =============================================================================
|
||||
|
||||
FROM hashicorp/terraform:1.5.7
|
||||
|
||||
LABEL maintainer="Damien Arnodo"
|
||||
LABEL description="Terraform CI image with tflint for Gitea Actions"
|
||||
|
||||
# Installation des outils supplémentaires
|
||||
RUN apk add --no-cache \
|
||||
curl \
|
||||
git \
|
||||
bash \
|
||||
jq
|
||||
|
||||
# Installation de tflint
|
||||
ARG TFLINT_VERSION=0.54.0
|
||||
RUN curl -sL "https://github.com/terraform-linters/tflint/releases/download/v${TFLINT_VERSION}/tflint_linux_amd64.zip" -o /tmp/tflint.zip \
|
||||
&& unzip /tmp/tflint.zip -d /usr/local/bin \
|
||||
&& rm /tmp/tflint.zip \
|
||||
&& chmod +x /usr/local/bin/tflint
|
||||
|
||||
# Vérification des versions
|
||||
RUN terraform version && tflint --version
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
ENTRYPOINT []
|
||||
CMD ["/bin/bash"]
|
||||
Reference in New Issue
Block a user