You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can also use the resource to build an image. By default the build block is using the old legacy docker build. In order to use a buildx builder, please read the section below
46
+
You can also use the resource to build an image. If you want to use a buildx builder with all of its features, please read the section below.
47
47
48
48
-> **Note**: The default timeout for the building is 20 minutes. If you need to increase this, you can use [operation timeouts](https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts).
49
49
@@ -85,7 +85,7 @@ resource "docker_image" "zoo" {
85
85
86
86
-> **Note**: The buildx feature is currently in preview and may have some quirks. Known issues: Setting `ulimits` will not work.
87
87
88
-
The `build` argument uses the legacy docker builder. If you want to use a buildx builder, you need to set the `builder` argument. For the default buildx builder, you can set the `builder` argument to `default`. For a custom buildx builder, you can set the `builder` argument to the name of the builder. You can find the name of the builder by running `docker buildx ls`.
88
+
If you want to use a buildx builder, you need to set the `builder` argument. For the default buildx builder, you can set the `builder` argument to `default`. For a custom buildx builder, you can set the `builder` argument to the name of the builder. You can find the name of the builder by running `docker buildx ls`.
89
89
90
90
The single platform build result is automatically loaded to `docker images`.
91
91
@@ -125,7 +125,7 @@ Optional:
125
125
-`build_args` (Map of String) Pairs for build-time variables in the form of `ENDPOINT : "https://example.com"`
126
126
-`build_id` (String) BuildID is an optional identifier that can be passed together with the build request. The same identifier can be used to gracefully cancel the build with the cancel request.
127
127
-`build_log_file` (String) Path to a file where the buildx log are written to. Only available when `builder` is set. If not set, no logs are available. The path is taken as is, so make sure to use a path that is available.
128
-
-`builder` (String) Set the name of the buildx builder to use. If not set or empty, the legacy builder will be used.
128
+
-`builder` (String) Set the name of the buildx builder to use. If not set, the legacy builder is used.
129
129
-`cache_from` (List of String) Images to consider as cache sources
130
130
-`cgroup_parent` (String) Optional parent cgroup for the container
131
131
-`cpu_period` (Number) The length of a CPU period in microseconds
@@ -143,7 +143,7 @@ Optional:
143
143
-`memory_swap` (Number) Total memory (memory + swap), -1 to enable unlimited swap
144
144
-`network_mode` (String) Set the networking mode for the RUN instructions during build
145
145
-`no_cache` (Boolean) Do not use the cache when building the image
146
-
-`platform` (String) Set platform if server is multi-platform capable
146
+
-`platform` (String) Set the target platform for the build. Defaults to `GOOS/GOARCH`. For more information see the [docker documentation](https://github.com/docker/buildx/blob/master/docs/reference/buildx.md#-set-the-target-platforms-for-the-build---platform)
147
147
-`pull_parent` (Boolean) Attempt to pull the image even if an older image exists locally
148
148
-`remote_context` (String) A Git repository URI or HTTP/HTTPS context URI. Will be ignored if `builder` is set.
149
149
-`remove` (Boolean) Remove intermediate containers after a successful build. Defaults to `true`.
Description: "Set platform if server is multi-platform capable",
391
+
Description: "Set the target platform for the build. Defaults to `GOOS/GOARCH`. For more information see the [docker documentation](https://github.com/docker/buildx/blob/master/docs/reference/buildx.md#-set-the-target-platforms-for-the-build---platform)",
Copy file name to clipboardExpand all lines: templates/resources/image.md.tmpl
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ you need to use it in combination with `docker_registry_image` as follows:
28
28
29
29
### Build
30
30
31
-
You can also use the resource to build an image.By default the build block is using the old legacy docker build. In order to use a buildx builder, please read the section below
31
+
You can also use the resource to build an image.If you want to use a buildx builderwith all of its features, please read the section below.
32
32
33
33
-> **Note**: The default timeout for the building is 20 minutes. If you need to increase this, you can use [operation timeouts](https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts).
34
34
@@ -46,7 +46,7 @@ You can use the `triggers` argument to specify when the image should be rebuild.
46
46
47
47
-> **Note**: The buildx feature is currently in preview and may have some quirks. Known issues: Setting `ulimits` will not work.
48
48
49
-
The `build` argument uses the legacy docker builder.If you want to use a buildx builder, you need to set the `builder` argument. For the default buildx builder, you can set the `builder` argument to `default`. For a custom buildx builder, you can set the `builder` argument to the name of the builder. You can find the name of the builder by running `docker buildx ls`.
49
+
If you want to use a buildx builder, you need to set the `builder` argument. For the default buildx builder, you can set the `builder` argument to `default`. For a custom buildx builder, you can set the `builder` argument to the name of the builder. You can find the name of the builder by running `docker buildx ls`.
50
50
51
51
The single platform build result is automatically loaded to `docker images`.
0 commit comments