Skip to content
Snippets Groups Projects
Commit 89a0b0c3 authored by Mickael Masquelin's avatar Mickael Masquelin
Browse files

fix(exemples-terraform): Correction sur utilisation de la socket

parent 153674f4
No related branches found
No related tags found
No related merge requests found
...@@ -7,16 +7,21 @@ terraform { ...@@ -7,16 +7,21 @@ terraform {
} }
} }
provider "docker" { variable "docker_api_path" {
host = "unix:///var/run/docker.sock" type = string
description = "Chemin d'accès à l'API (via tcp ou unix)"
} }
resource "docker_image" "ubuntu" { provider "docker" {
name = "local/ubu-form-cnrs-nginx:latest" # Pour un hôte linux, déclaration de l'hôte :
# "unix:///var/run/docker.sock"
# Adaptation pour macOS :
# "unix:///$HOME/.docker/run/docker.sock"
host = var.docker_api_path
} }
resource "docker_container" "terraform_container" { resource "docker_container" "terraform_container" {
image = docker_image.ubuntu.latest image = "local/ubu-form-cnrs-nginx:22.04.2"
name = "nginx_via_terraform" name = "nginx_via_terraform"
ports { ports {
internal = "80" internal = "80"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment