mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2026-01-07 07:19:37 -05:00
* chore: format test configs for datasources * chore: outlines load test config helper and structure * docs(contributing): add command for resouce tests to have an example of the regex * refactor: move container test configs into separate files * fix: add insecure_skip_verify for image pulls to fix the local test setup with invalid certs * chore(ci): remove insecure registry adaption * chore: regenerate website * chore: update gitignore for scipts/testing dir * fix: replace nodejs services with go versions * fix: move testing program versions in separate files * test: reactivate flaky test from travis * chore: fix linter on all go files * fix(linter): testing go servers * chore(ci): add env for go version * chore(ci): name workflow steps also moves description of available docker versions in to acc dockerfile * Revert "test: reactivate flaky test from travis" This reverts commit b02654acc4d6b7d02c8f3ba090e6a3f248741b10. * docs: fix provider-ssh example * chore: use alpine als final image for tests * refactor: move test configs from folder into testname.tf files * refactor: image delete log is now debug and indented * refactor: image test config into seprate files * refactor: move network test config into seperate files * refactor: move plugin test config into seperate files * chore: rename registry image test file * refactor: move registry_image test config into seperate files * chore: format secret test configs * refactor: inline volume test configs * fix: remove unused volume label test function * refactor: move service test configs into seperate files * test: reactivate and fix service test * chore: simplify insecure skip verify add to http client * chore(ci): debug into service test * chore(ci): add testacc setup * chore: format tf config for provider test * chore(ci): add debug output for config.json * fix: check service auth for emptyness * fix: remove re-read of provider auth config because the bug occured only in CI as the meta object might be GCd * test: pass auth to service instead of provider * chore: reactivate all acc tests * test: outlines service inspect json check for full spec * test: add service inspect json checks * test: finish service inspect json checks * chore(service): move test helper to end to of the file * chore: move mapEquals to test helpers * test: add json inspect for config * chore: add debug inspect log for plugin, secret and volume * test: add json inspect for secret * test: add json inspect for image * test: add json inspect for network * test: add json inspect for plugin * test: add json inspect for volume * test: inline ds plugin test configs * test: inline network configs * test: move ds reg image configs into separate files * test: reactivates container upload checks * chore: adapt issues ref from old to new xw repo * fix: reactivate network ingress test and provide helpers for removing the default ingress network and leaving the swamr * docs: rerun website gen * test: fix reg image build and keep test * chore: add name to todo * chore: move ds network and plugin specs to file * chore: format provider test spec * chore: use simpler error message for empty strings
4.5 KiB
4.5 KiB
| page_title | subcategory | description |
|---|---|---|
| docker_registry_image Resource - terraform-provider-docker | Manages the lifecycle of docker image/tag in a registry. |
docker_registry_image (Resource)
Manages the lifecycle of docker image/tag in a registry.
Example Usage
resource "docker_registry_image" "helloworld" {
name = "helloworld:1.0"
build {
context = "pathToContextFolder"
}
}
Schema
Required
- name (String) The name of the Docker image.
Optional
- build (Block List, Max: 1) Definition for building the image (see below for nested schema)
- id (String) The ID of this resource.
- insecure_skip_verify (Boolean) If
true, the verification of TLS certificates of the server/registry is disabled. Defaults tofalse - keep_remotely (Boolean) If true, then the Docker image won't be deleted on destroy operation. If this is false, it will delete the image from the docker registry on destroy operation. Defaults to
false
Read-Only
- sha256_digest (String) The sha256 digest of the image.
Nested Schema for build
Required:
- context (String) The path to the context folder
Optional:
- auth_config (Block List) The configuration for the autentication (see below for nested schema)
- build_args (Map of String) Pairs for build-time variables in the form TODO
- build_id (String) BuildID is an optional identifier that can be passed together with the build request. The
- cache_from (List of String) Images to consider as cache sources
- cgroup_parent (String) Optional parent cgroup for the container
- cpu_period (Number) The length of a CPU period in microseconds
- cpu_quota (Number) Microseconds of CPU time that the container can get in a CPU period
- cpu_set_cpus (String) CPUs in which to allow execution (e.g.,
0-3,0,1) - cpu_set_mems (String) MEMs in which to allow execution (
0-3,0,1) - cpu_shares (Number) CPU shares (relative weight)
- dockerfile (String) Dockerfile file. Defaults to
Dockerfile - extra_hosts (List of String) A list of hostnames/IP mappings to add to the container’s /etc/hosts file. Specified in the form ["hostname:IP"]
- force_remove (Boolean) Always remove intermediate containers
- isolation (String) Isolation represents the isolation technology of a container. The supported values are
- labels (Map of String) User-defined key/value metadata
- memory (Number) Set memory limit for build
- memory_swap (Number) Total memory (memory + swap), -1 to enable unlimited swap
- network_mode (String) Set the networking mode for the RUN instructions during build
- no_cache (Boolean) Do not use the cache when building the image
- platform (String) Set platform if server is multi-platform capable
- pull_parent (Boolean) Attempt to pull the image even if an older image exists locally
- remote_context (String) A Git repository URI or HTTP/HTTPS context URI
- remove (Boolean) Remove intermediate containers after a successful build (default behavior)
- security_opt (List of String) The security options
- session_id (String) Set an ID for the build session
- shm_size (Number) Size of /dev/shm in bytes. The size must be greater than 0
- squash (Boolean) If true the new layers are squashed into a new image with a single new layer
- suppress_output (Boolean) Suppress the build output and print image ID on success
- target (String) Set the target build stage to build
- ulimit (Block List) Configuration for ulimits (see below for nested schema)
- version (String) Version of the unerlying builder to use
Nested Schema for build.auth_config
Required:
- host_name (String) hostname of the registry
Optional:
- auth (String) the auth token
- email (String) the user emal
- identity_token (String) the identity token
- password (String) the registry password
- registry_token (String) the registry token
- server_address (String) the server address
- user_name (String) the registry user name
Nested Schema for build.ulimit
Required:
- hard (Number) soft limit
- name (String) type of ulimit, e.g.
nofile - soft (Number) hard limit