terraform-provider-docker/testdata/resources/docker_container/testAccDockerContainerNetworksIPv4AddressConfig.tf
Martin ca8f7b8a0d
Fix: calculation of Dockerfile path in docker_image build (#853)
* fix: Update dockerfile and context handling

* chore: Update documentation

* fix: Golangci lint error in testing code

* fix: formatting

* chore: Fix failing tests due to docker 29

* chore: Use 28.5.1 docker engine for tests

* fix: Improve docker swarm handling for tests

* fix: Use outputs from setup-docker step to set DOCKER_HOST env

* chore: Revert legacy docker build changes and switch to docker engine 28.0.4

* chore: Improve tests so that they do not fail

* fix: Revert maxfailureratio cange in docker service test
2026-02-20 17:33:27 +01:00

19 lines
413 B
HCL

resource "docker_network" "test" {
name = "tf-test"
ipam_config {
subnet = "10.0.1.0/24"
gateway = "10.0.1.1"
}
}
resource "docker_image" "foo" {
name = "nginx:latest"
keep_locally = true
}
resource "docker_container" "foo" {
name = "tf-test"
image = docker_image.foo.image_id
networks_advanced {
name = docker_network.test.name
ipv4_address = "10.0.1.123"
}
}