mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2025-12-25 17:19:34 -05:00
24 lines
464 B
Terraform
24 lines
464 B
Terraform
|
|
resource "docker_image" "foo_mounts" {
|
||
|
|
name = "nginx:latest"
|
||
|
|
}
|
||
|
|
|
||
|
|
resource "docker_volume" "foo_mounts" {
|
||
|
|
name = "testAccDockerContainerMounts_volume"
|
||
|
|
}
|
||
|
|
|
||
|
|
resource "docker_container" "foo_mounts" {
|
||
|
|
name = "tf-test"
|
||
|
|
image = docker_image.foo_mounts.latest
|
||
|
|
|
||
|
|
mounts {
|
||
|
|
target = "/mount/test"
|
||
|
|
source = docker_volume.foo_mounts.name
|
||
|
|
type = "volume"
|
||
|
|
read_only = true
|
||
|
|
}
|
||
|
|
mounts {
|
||
|
|
target = "/mount/tmpfs"
|
||
|
|
type = "tmpfs"
|
||
|
|
}
|
||
|
|
}
|