Création de Dockerfile #
FROM hashicorp/tfc-agent:latest
# Switch the to root user in order to perform privileged actions such as
# installing software.
USER root # Install our utils, including cowsay
RUN apt-get update
RUN apt-get install -y sudo unzip cowsay
# Switch back to the tfc-agent user as needed by Terraform agents.
USER tfc-agent
Construction de l’image Terraform #
docker build --tag tfe/custom-image .
#Optionnel pour voir le détail de l'image
docker image inspect tfe/custom-image
Sur le dashboard TFE dans Settings ajouter le chemin de l’image sous TFE agent image.