34 lines
944 B
Docker
34 lines
944 B
Docker
# =============================================================================
|
|
# 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"]
|